4

I'm trying to follow an online course of laravel with laragon. I need to run the command npm install, but it marks an error and I don't know how to fix it.

I tried to modify the path but that did not work

C:\laragon\www\social>npm install
"CALL "C:\laragon\nodejs\\node.exe" "C:\laragon\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

> node-sass@4.11.0 install C:\laragon\www\social\node_modules\node-sass
> node scripts/install.js

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 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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! file C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm
npm ERR! path C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm
npm ERR! node-sass@4.11.0 install: `node scripts/install.js`
npm ERR! spawn C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm ENOENT
npm ERR!
npm ERR! Failed at the node-sass@4.11.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\Caribay\AppData\Roaming\npm-cache\_logs\2019-01-22T03_32_49_327Z-debug.log

I hope with this command works correctly but it marks these errors, help me, please

P.S: I work on a laptop with windows 7 home premium.

Ali Shaukat
  • 935
  • 6
  • 20

2 Answers2

6
  1. $ npm cache clean --force
  2. delete node_modules by $ rm -rf node_modules
  3. $ npm install

And then start it again with $ npm start

Bruno Bieri
  • 9,724
  • 11
  • 63
  • 92
rize
  • 1,104
  • 8
  • 9
0

I think you should install manually ajv package or update it to version 6.0 if you already have a lower version

npm i ajv

i had a similar issue. after updating it works fine. Try doing same for other errors also.

Anand Mainali
  • 993
  • 1
  • 14
  • 23
  • This answer works, but now I have another problem, when I use npm install again, this happen npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) – Emmanuel Tamburini Feb 25 '19 at 04:17
  • `fsevents` is for MacOS, see https://www.npmjs.com/package/fsevents. You're using Windows – rize Oct 07 '19 at 14:09