Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Docs could be better #17

@NaturelLee

Description

@NaturelLee

in ubuntu

Installation needed

  1. ssvmup
npm i -g ssvmup
  1. wasm-opt
npm i -g wasm-opt
  1. node-pre-gyp
npm i -g  node-pre-gyp

Errors

// this is the file ssvm_nodejs_starter_lib.js generated by ssvmup build

let vm;

/**
* @param {string} s
* @returns {string}
*/
module.exports.say = function(s) {
    if (typeof s === 'object') s = JSON.stringify(s);
    return vm.RunString('say', s);
};

const path = require('path').join(__dirname, 'ssvm_nodejs_starter_lib_bg.wasm');
const ssvm = require('ssvm'); 
vm = new ssvm.VM(path, { args:process.argv, env:process.env, preopens:{'/': __dirname} });

ssvm is a node module? but when installed globally, then run node node/app.js

Error: Cannot find module 'ssvm'

I tried several times, it still failed.

If ssvm is only available from source code/docker. The node module ssvm should be deprecated/deleted.

It's not easy to use it for newbies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions