NPM installation problem In Laravel in Windows 10

2255 views laravel
-1

My NPM ver is 5.6.0

My Node ver is v8.11.3

Laravel Framework 5.7.12

I have some Problems When i want to install The npm in laravel which are as follows

npm install

npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

node-sass@4.10.0 install C:\xampp\htdocs\Newapp\node_modules\node-sass

node scripts/install.js

'node' is not recognized as an internal or external command, operable program or batch file.

npm WARN img-loader@3.0.1 requires a peer of imagemin@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! node-sass@4.10.0 install: node scripts/install.js

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the node-sass@4.10.0 install 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\bamas\AppData\Roaming\npm-cache_logs\2018-11-07T03_33_04_531Z-debug.log

MY package.json is

{ "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.18", "bootstrap": "^4.0.0", "cross-env": "^5.1", "jquery": "^3.2", "laravel-mix": "^2.0", "lodash": "^4.17.5", "popper.js": "^1.12", "vue": "^2.5.17" } }

I already tried everithing like cache clear re installing nodemodules but its not effect.. My NPM is alright Because whenever i run my other Nodejs script it work perfectly....

answered question

1 Answer

11

You can use this one.

npm install --unsafe-perm node-sass

after done. and if you wish to run this.

npm run watch-poll

Hope this help.

posted this

Have an answer?

JD

Please login first before posting an answer.