This is the error log
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prestart: `sequelize db:migrate && ./node_modules/.bin/sequelize db:seed:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prestart script.
Here is the script
"lint": "eslint",
"test": "export NODE_ENV=test && mocha --timeout 100000",
"prestart": "./node_modules/.bin/sequelize db:migrate && ./node_modules/.bin/sequelize db:seed:all",
"start": "./node_modules/pm2/bin/pm2 start pm2server.config.js",
"poststart": "./node_modules/pm2/bin/pm2 log HumanR"
You're on Windows, but trying to run a script designed for linux (it has linux path separators, which confuse Windows).
Inside an npm script, you can refer to locally installed package binaries by name. Doing so will eliminate your path issue.
"test": "export NODE_ENV=test && mocha --timeout 100000",
"prestart": "sequelize db:migrate && sequelize db:seed:all",
"start": "pm2 start pm2server.config.js",
"poststart": "pm2 log HumanR"
You might also run into an issue with the export NODE_ENV=test command. You'll need cross-env for that.
npm install --save-dev cross-env
Then in package.json:
"test": "cross-env NODE_ENV=test mocha --timeout 100000",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With