Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start script file has error. #440

Open
Stanlyhalo opened this issue Jun 11, 2020 · 1 comment
Open

start script file has error. #440

Stanlyhalo opened this issue Jun 11, 2020 · 1 comment

Comments

@Stanlyhalo
Copy link

This is the default start script file provided by NodeOS:

#!/usr/bin/env node

/**
 * NodeOS
 *
 * @copyright 2013-2017 Jacob Groundwater, Jesús Leganés-Combarro 'piranna'
 *  and other contributors
 *
 * @license MIT
 */

const spawn = require('child_process').spawn;

const prepareCommandLine = require('..')


const {command, argv, cwd} = prepareCommandLine(process.argv.slice(2))


// Exec NodeOS
spawn(command, argv, {stdio: 'inherit', cwd})
.on('error', console.trace.bind(console))
.on('exit', function(code, signal)
{
  process.exit(code || signal)
})

And when I run "npm start" in Ubuntu WSL it displays this error:

const {command, argv, cwd} = prepareCommandLine(process.argv.slice(2))
                             ^

TypeError: prepareCommandLine is not a function

I have also tried "bash npm start", but it just displays this error:

/home/stanlyhalo/.nvm/versions/node/v12.18.0/bin/npm: npm: line 2: syntax error near unexpected token `;'
/home/stanlyhalo/.nvm/versions/node/v12.18.0/bin/npm: npm: line 2: `;(function () { // wrapper in case we're in module_context mode'

What I'm trying to do in the end is run NodeOS in qemu.

@Stanlyhalo
Copy link
Author

Also I can't installed the module "`nodeos-usersf'" and this some of the error (that I believe are major keys):

gyp ERR! stack Error: `make` failed with exit code: 2
src-errno@0.2.0 install: `node-gyp rebuild`
Failed at the src-errno@0.2.0 install script.

There are also some hints to as why it errored earlier in the error notice, so here they are:

../src/errno.cc: At global scope:
../src/errno.cc:25:11: error: variable or field ‘init’ declared void
   25 | void init(Handle<Object> exports) {
      |           ^~~~~~
../src/errno.cc:25:11: error: ‘Handle’ was not declared in this scope
../src/errno.cc:25:24: error: expected primary-expression before ‘>’ token
   25 | void init(Handle<Object> exports) {
      |                        ^
../src/errno.cc:25:26: error: ‘exports’ was not declared in this scope
   25 | void init(Handle<Object> exports) {
      |                          ^~~~~~~
In file included from ../src/errno.cc:6:
../src/errno.cc:32:22: error: ‘init’ was not declared in this scope; did you mean ‘int’?
   32 | NODE_MODULE(binding, init)
      |                      ^~~~
/home/stanlyhalo/.cache/node-gyp/12.18.0/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’
  608 |       (node::addon_register_func) (regfunc),                          \
      |                                    ^~~~~~~
../src/errno.cc:32:1: note: in expansion of macro ‘NODE_MODULE’
   32 | NODE_MODULE(binding, init)
      | ^~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant