[go: nahoru, domu]

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

Missing script for 'npm run schema' #298

Closed
Multidivide opened this issue Oct 28, 2019 · 4 comments
Closed

Missing script for 'npm run schema' #298

Multidivide opened this issue Oct 28, 2019 · 4 comments
Assignees
Labels
solved use to identify issue that has been solved (must be linked to the solving PR)
Milestone

Comments

@Multidivide
Copy link

Hi all,
So I've been trying to follow manual installation guide and I'm currently up to a step where I need to create my database schema and add initial data. Currently using the V2.0.1 release.

Unfortunately, when i run the command 'npm run schema' I encounter the following error:

npm ERR! missing script: schema
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/opencti/.npm/_logs/2019-10-28T04_14_02_197Z-debug.log

My current versions of Node.js and NPM are the following:
Node.js = v12.13.0
npm = v6.12.0

The following debug log shows the following:

cat /home/opencti/.npm/_logs/2019-10-28T04_50_55_559Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/opencti/.nvm/versions/node/v12.13.0/bin/node',
1 verbose cli   '/home/opencti/.nvm/versions/node/v12.13.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'schema'
1 verbose cli ]
2 info using npm@6.12.0
3 info using node@v12.13.0
4 verbose stack Error: missing script: schema
4 verbose stack     at run (/home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/run-script.js:155:19)
4 verbose stack     at /home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/lib/run-script.js:63:5
4 verbose stack     at /home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5
4 verbose stack     at /home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:435:5
4 verbose stack     at handleExists (/home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:400:20)
4 verbose stack     at /home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:415:31
4 verbose stack     at callback (/home/opencti/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:295:20)
4 verbose stack     at FSReqCallback.oncomplete (fs.js:159:5)
5 verbose cwd /home/opencti/Desktop/opencti/config
6 verbose Linux 5.0.0-32-generic
7 verbose argv "/home/opencti/.nvm/versions/node/v12.13.0/bin/node" "/home/opencti/.nvm/versions/node/v12.13.0/bin/npm" "run" "schema"
8 verbose node v12.13.0
9 verbose npm  v6.12.0
10 error missing script: schema
11 verbose exit [ 1, true ]

However, when I run the command npm install schema to try solve this (while in the opencti/config directory), I get a large error and warning messages. Below is the tail portion of the error message.

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! grpc@1.24.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the grpc@1.24.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I've been really wrecking my brain over this but any help or advice would be greatly appreciated, I don't have as much experience with Node.js so any advice is appreciated. I haven't had any luck running 'npm install' to install missing dependencies.

@SamuelHassine
Copy link
Member

Hello @Multidivide,

The command npm run schema is not needed anymore (as the command npm run migrate). Just skip these 2 commands and just run the server with node dist/server.js. It will create the schema and run the migration.

We will update the documentation.

@SamuelHassine
Copy link
Member

@Multidivide is the problem solved?

@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Oct 28, 2019
@SamuelHassine
Copy link
Member

The documentation has been updated.

@Multidivide
Copy link
Author
Multidivide commented Oct 28, 2019

@Multidivide is the problem solved?
@SamuelHassine Yes it has! Apologies for the late response.

@SamuelHassine SamuelHassine added this to the Release 2.0.2 milestone Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

2 participants