相关疑难解决方法(0)

节点错误无法读取未定义的属性“ resolve”

我正在使用reactjs并且无法使用安装任何软件包npm install。我收到的错误消息是:

npm ERR! Cannot read property 'resolve' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/stash/.npm/_logs/2019-03-11T10_07_30_264Z-debug.log
Run Code Online (Sandbox Code Playgroud)

当我这样做时npm install -verbose

npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   '-verbose' ]
npm info using npm@6.7.0
npm info using node@v11.10.1
npm verb npm-session 869376d36eca27b5
npm info lifecycle proj-lite@1.0.0-alpha.6~preinstall: proj-lite@1.0.0-alpha.6
npm timing stage:loadCurrentTree Completed …
Run Code Online (Sandbox Code Playgroud)

javascript node.js npm node-modules reactjs

10
推荐指数
3
解决办法
1万
查看次数

使用 npm 安装软件包时无法读取未定义的属性“解析”

我无法使用 npm 在我的 Windows 10 机器上做任何事情。我总是得到:npm ERR!无法读取未定义的属性“解析”。

我正在使用 VSCode。

npm install npm -g 
Run Code Online (Sandbox Code Playgroud)

给我与“npm i”相同的信息。我已经卸载了 Node 并重新安装了两次,但没有帮助。我删除了我唯一的开发目录中的 node-modules 目录。我没有其他想法。

这是现在完整的日志的样子:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'i' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose npm-session c94eba96e7c1121e
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall wordgame@1.0.0
7 info lifecycle wordgame@1.0.0~preinstall: wordgame@1.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing …
Run Code Online (Sandbox Code Playgroud)

windows node.js npm

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

node.js ×2

npm ×2

javascript ×1

node-modules ×1

reactjs ×1

windows ×1