简体   繁体   English

每个 npm 命令都会抛出错误

[英]Every npm command throwing errors

I'm playing around with a test Laravel app and I'm trying to run "npm run watch" but it just throws errors.我正在玩一个测试 Laravel 应用程序,我正在尝试运行“npm run watch”,但它只是抛出错误。 Even with "npm install", it does the same thing.即使使用“npm install”,它也会做同样的事情。 I'm on a Mac by the way.顺便说一下,我在 Mac 上。 I just can't get anything to work and I have no idea why.我就是什么都做不了,我也不知道为什么。 If I've missed some information that you need, please tell me.如果我遗漏了您需要的某些信息,请告诉我。 Thanks in advance!提前致谢!

npm run watch - log file npm run watch - 日志文件

npm install - error from terminal (log file was like 10k lines) npm install - 来自终端的错误(日志文件就像 10k 行)

You have to try to uninstall the node.js and again install the nodejs(8.00.4 LTS version. Link(" https://nodejs.org/en/download/ ")).您必须尝试卸载 node.js 并再次安装 nodejs(8.00.4 LTS 版本。链接(“ https://nodejs.org/en/download/ ”))。 Then to checking the node.js running properly or not go to the terminal and type command 'node -v' it shows the node.js installed version.然后要检查 node.js 是否正常运行,请转到终端并输入命令“node -v”,它会显示 node.js 安装的版本。 Then try to implement the npm commands.然后尝试实现 npm 命令。

I've got everything working now.我现在一切正常。 I just needed to change ownership of the node_module files.我只需要更改 node_module 文件的所有权。 <3 <3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM