Miguel Angel Echeverri Quiroz
PreguntaHola me sale este error:
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/random-messages/bin/global.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/random-messages/bin/global.js’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mage/.npm/_logs/2021-01-18T16_13_00_740Z-debug.log

Juan Camilo Alvarez Muñoz
Hola, en mi caso, estaba usando powershell, pero cambie a la terminal de wsl Ubuntu y me funciono perfectamente

Axel Enrique Galeed Gutierrez
Hola, @maeq5. Creo que llego medio tarde, pero he podido solucionar este problema cerrando y volviendo a abrir mi terminal. Saludos.

David Saavedra Vázquez
Me pasó lo mismo Miguel, es cuestión de usar el comando PWD para saber bien la ruta. La copias y la pegas después del siguiente comando:
sudo npm install -g

Kevin Fabricio Cárdenas López
Verificar que la carpeta bin con el archivo global.js este fuera de la carpeta src
Miguel Angel Echeverri Quiroz
Lo intenté pero no funcionó

Rafael Alejandro Santos Trujillo
Se me ocurriría intentar tal vez con el comando: npm cache clean