I'm trying to create a command to compile scss into css more easily. I installed nodejs, npm and node-sass.
I then created this run script:
"start": "sass ./sass/style.scss style.css --watch"
And run command: npm start , also use npm run scss
but it returns this error:
'sass' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ecommercesite#1.0.0 start: `sass ./sass/style.scss style.css --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ecommercesite#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
I also tried running the npm install command for node_modules but it continuously throws the same error.
I would be grateful if anyone help to solve this.
Try
"start": "node-sass ./sass/style.scss style.css --watch"
instead, or if you want to run it from the command line:
npx node-sass ./sass/style.scss style.css --watch
Related
I'm trying to run the Development environment of bigblubutton-html5, however
below is the error message that is generated after running the following command:
npm start
This is the tutorial that I followed: https://docs.bigbluebutton.org/2.2/dev.html
This is the error message:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bbb-html5-client# start:dev: `ROOT_URL=http://127.0.0.1/html5client NODE_ENV=development meteor`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bbb-html5-client# start:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-30T23_28_17_291Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bbb-html5-client# start: `if test "$NODE_ENV" = "production" ; then npm run start:prod; else npm run start:dev; fi`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bbb-html5-client# start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-30T23_28_17_304Z-debug.log
I got the solution
First
meteor npm install
Then
export METEOR_ALLOW_SUPERUSER=true
Finally
npm start
These commands solved the problem for me.
If it doesn't work the first time, maybe you need make this steps first.
npm cache clean --force
rm -r node_modules
rm -r package-lock.json
And try the first commands again.
Fairly new to webdev and I want to run this person's code:
https://github.com/RaidVisat/template-ract-redux-orm-sqlz-ssr
Not familiar with webpack yet, and I've tried every route of npm install/start with no success.
Also, I tried the start command in the package.json file: "cross-env NODE_ENV=development node src" and did not have success.
(Also, pretty sure I have all the proper global packages installed, could be wrong tho.)
Currently getting this error:
cross-env NODE_ENV=development node src
sh: cross-env: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! nde05#0.0.0 start: cross-env NODE_ENV=development node src
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the nde05#0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
getting errors in the terminal when trying to use npm to deploy a website on github
I have no idea what to try
PS C:\Users\user\modern_portfolio> npm run deploy
> modern_portfolio#1.0.0 deploy C:\Users\user\modern_portfolio
> gh-pages -d dist
The "file" argument must be of type string. Received type undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! modern_portfolio#1.0.0 deploy: `gh-pages -d dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the modern_portfolio#1.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-08-04T04_12_42_515Z-debug.log
Newer version 2.1 has some issue. They are probably working on it. Revert back to 2.0.1.
Reinstall Github pages with a specific version:
npm uninstall gh-pages
npm i gh-pages#2.0.1
npm run deploy // as usual
I've forked a project from GitHub, and I want to run the command npm run sjs, but it gives me an error. This is what it says:
> vodafone#0.1.0 sjs C:\Users\audre\fantastic-website\vodafone\vodafone
> json-server ./data/phones.json -p 1234 --watch
'json-server' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vodafone#0.1.0 sjs: `json-server ./data/phones.json -p 1234 --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vodafone#0.1.0 sjs script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\audre\AppData\Roaming\npm-cache\_logs\2018-07-07T09_35_19_168Z-debug.log
Please help; thanks a lot!
TL;DR;
just run npm install json-server and you'll be OK.
Explanation
npm scripts
When running a script via npm, node is looking for the command in:
local node_modules/.bin folder (things that are in package.json)
global node_modules/.bin folder (things that you've installed with npm install -g my-package)
your standard shell PATH
your problem
In that case, I guess that the creator of this repo had the json-server package installed, either locally without stating so in package.json or globally.
recommendation
My recommendation is that you run npm install --save json-server and update the package.json file.
Actually, I did it already for you: https://github.com/catezee/vodafone/pull/1
I'm trying to install phonegap but getting following error message. I have tried this for cordova also but of no use, Please help me
Your environment has been set up for using Node.js 0.10.33 (x64) and npm.
C:\Users\saiki>install -g phonegap
'install' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\saiki>npm install -g phonegap
/
> ws#0.4.31 install C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\nod
e_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_mo
dules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
\
C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-ph
onegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws>node "C:\Pr
ogram Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
ode-gyp\bin\node-gyp.js" rebuild
/
> ws#0.4.31 install C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\nod
e_modules\connect-phonegap\node_modules\socket.io\node_modules\socket.io-client\
node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-ph
onegap\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.
io-client\node_modules\ws>node "C:\Program Files (x86)\nodejs\node_modules\npm\b
in\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! File: C:\Users\saiki\AppData\Roaming\npm-cache\lodash\2.4.1\package\pac
kage.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Users\saiki
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! file C:\Users\saiki\AppData\Roaming\npm-cache\lodash\2.4.1\package\pack
age.json
npm ERR! code EJSONPARSE
npm ERR! not ok code 0
C:\Users\saiki>
please reply me as soon as possible.
Some text to make this post work or just to get submitted
Thanks in advance