Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/470.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript js模块:471抛出错误;_Javascript_Node.js_Npm - Fatal编程技术网

Javascript js模块:471抛出错误;

Javascript js模块:471抛出错误;,javascript,node.js,npm,Javascript,Node.js,Npm,我一整天都在试图解决这个问题,现在我已经不知所措了 npm不工作,每当我尝试使用它时,都会抛出以下错误: C:\Users\Bernh\Desktop\Coding Projects>npm-v module.js:471 犯错误; ^ 错误:找不到模块“继承” 在Function.Module.\u解析文件名(Module.js:469:15) 在Function.Module.\u加载(Module.js:417:25) at Module.require(Module.js:497:17

我一整天都在试图解决这个问题,现在我已经不知所措了

npm不工作,每当我尝试使用它时,都会抛出以下错误:


C:\Users\Bernh\Desktop\Coding Projects>npm-v
module.js:471
犯错误;
^
错误:找不到模块“继承”
在Function.Module.\u解析文件名(Module.js:469:15)
在Function.Module.\u加载(Module.js:417:25)
at Module.require(Module.js:497:17)
根据需要(内部/module.js:20:19)
反对。(C:\Users\Bernh\AppData\Roaming\npm\node\u modules\npm\node\u modules\readable stream\lib\u stream\u readable.js:68:17)
在模块处编译(Module.js:570:32)
在Object.Module.\u extensions..js(Module.js:579:10)
在Module.load(Module.js:487:32)
在tryModuleLoad时(module.js:446:12)
在Function.Module.\u加载(Module.js:438:3)

我试过: -重新安装nodejs -安装不同版本的nodejs -运行任何npm命令都会出现相同的错误

我已经被推荐了一些关于stackoverflow的类似答案,但这些答案并不相同,因为每个人都使用npm来修复他们的npm。。。由npm做什么

还有一些答案是针对lunix命令行的,我找不到任何适用于windows的等效命令

我尝试了一个名为choco的安装程序,但似乎无法使用npm安装/卸载

有什么解决方案或建议吗


关于

经过两天的工作,我发现了这个问题

我手动进入Program Files和Program Files(x86)文件夹,删除了与npm和NodeJ有关的所有内容

然后我删除了问题发生时安装的XAMPP

然后我重新启动并重新安装了nodejs 6.11.4 LTS

这似乎解决了问题


希望这对某人有所帮助。

可能重复@MarkoGrešak的内容,请最好将投票结果作为重复内容而不是仅仅重复downvoting@DanFromGermany不能我因为不同的原因投了反对票并撤回了投票,现在我无法提交不同的反对理由。哈哈,好吧,nvm:-)
C:\Users\Bernh\Desktop\Coding Projects> npm -v
module.js:471
    throw err;
    ^

Error: Cannot find module 'inherits'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\Bernh\AppData\Roaming\npm\node_modules\npm\node_modules\readable-stream\lib\_stream_readable.js:68:17)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)