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

unable to get the sails api project up and running after generating the api base using the sails-rest-api #349

Open
anilprasad opened this issue Mar 14, 2018 · 4 comments

Comments

@anilprasad
Copy link

I have used only two of the services

  1. CipherService and
  2. HashService.js

Followed the following steps..

$ sudo npm install -g yo generator-sails-rest-api
$ mkdir myapi
$ cd myapi/
$ yo sails-rest-api
$ npm start

Environment: Environment ubuntu 14.04 LTS, 64 bit, Intel x86

After npm start, I am getting the following error...

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 silly lifecycle [email protected]
prestart: no script for prestart, continuing
7 info lifecycle [email protected]start: [email protected]
8 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home.....
10 verbose lifecycle [email protected]
start: CWD: /home/rhea/sailap/myapi
11 silly lifecycle [email protected]start: Args: [ '-c', 'node app.js' ]
12 silly lifecycle [email protected]
start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: node app.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/rhea/sailap/myapi
17 error Linux 3.13.0-45-generic
18 error argv "/usr/bin/node" "/usr/local/bin/npm" "start"
19 error node v8.9.4
20 error npm v3.10.5
21 error code ELIFECYCLE
22 error [email protected] start: node app.js
22 error Exit status 1

@anilprasad
Copy link
Author

npm version : 3.10.5
node version : v8.9.4

@ghaiklor
Copy link
Owner

@anilprasad I don't see any info about Sails or generators internals in the stack trace. Without additional information I can't help here.

@anilprasad
Copy link
Author

@ghaiklor thank you for the prompt reply. I did not get any other trace details apart from the above npm log. is this something to do with es6? as I could see good amount of usage of arrow functions in the code.

@ghaiklor
Copy link
Owner

@anilprasad you are using node v8, so it's not the case, imho. I believe, there are some old issues in generator-sails-rest-api related to ignoring stack trace in messages. Could be that is the case...

Try to generatre without additional services (clean setup). What will be the effect?

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

2 participants