Subhankar Jana
Subhankar Jana

Reputation: 151

NPM installation problem In Laravel in Windows 10

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 [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

[email protected] 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 [email protected] requires a peer of imagemin@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] install: node scripts/install.js

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] 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 i am using gitbash....

Upvotes: 0

Views: 4832

Answers (2)

Nathan Cook
Nathan Cook

Reputation: 1

I had the same problem. To solve it: rollback to NPM Version 5.6.0.

# npm install -g [email protected]

To Verify:

# npm -v

Note: I had to clear the cache, remove all files under node_modules, and package-lock.json.

Upvotes: 0

kouakou alexis
kouakou alexis

Reputation: 151

I had the same problem. This is my solution! Try cleaning the cache with the command

npm cache clean --force
and retry with
npm install

Upvotes: 1

Related Questions