我一直在尝试为Discord服务器制作基于RoVer的机器人,但是每当运行npm Install时,我都会不断收到ENOENT错误。
我知道还有其他类似的帖子,但是没有一个答案有效,并且它们与我遇到的问题也不完全相同。我已经尝试过重新安装Node.js和NPM,确保package.json在其中,然后重新启动并以管理员身份运行。 我当前正在运行Windows 10版本1903,节点版本12.13.0,npm版本6.12.0。
C:\Users\terri_3irl9af\Desktop\AMC Pilot Management>npm install
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\type-b1627078\array\ensure.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-map-8f9402c7\primitive\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-set-0c58b760\lib\iterator.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\type-b1627078\array\is.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\array.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-set-0c58b760\lib\primitive-iterator.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\for-of.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\get.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\inquirer-1bea01d1\lib\utils\events.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\inquirer-1bea01d1\lib\utils\paginator.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\is-iterable.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\inquirer-1bea01d1\lib\utils\readline.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\string.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\inquirer-1bea01d1\lib\utils\screen-manager.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es6-iterator-44858e44\test\valid-iterable.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\inquirer-1bea01d1\lib\utils\utils.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\readable-stream-cd75c034\lib\internal\streams\BufferList.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\readable-stream-cd75c034\lib\internal\streams\destroy.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\readable-stream-cd75c034\lib\internal\streams\stream-browser.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\readable-stream-cd75c034\lib\internal\streams\stream.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\eslint-9d02902d\lib\util\patterns\letters.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\eslint-9d02902d\lib\code-path-analysis'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\type-b1627078\test\array-length\coerce.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\type-b1627078\test\array-length\ensure.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\type-b1627078\test\array-like'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\array\#\map\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\array\#\map\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\array\#\map\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\array\#\map\shim.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\array\#\remove.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\array\#\separate.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\copy-within.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\entries.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\every.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\fill.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\filter.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\find-index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\find.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\flat-map.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\flatten.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\for-each.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\includes.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\index-of.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\iterator.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\join.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\keys.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\last-index-of.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\map.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\reduce-right.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\reduce.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\slice.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\some.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\sort.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\array\virtual\values.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\asap.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\clear-immediate.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\atanh\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\atanh\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\atanh\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\atanh\shim.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\cbrt'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\error\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\core-js-70848f9b\fn\error\is-error.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\log10\implement.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\log10\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\log10\is-implemented.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math\log10\shim.js'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\terri_3irl9af\Desktop\AMC Pilot Management\node_modules\.staging\es5-ext-7d8b429e\math'
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/discordjs/Commando.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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! C:\Users\terri_3irl9af\AppData\Roaming\npm-cache\_logs\2019-10-23T23_59_46_552Z-debug.log```
答案 0 :(得分:0)
听起来有点像权限问题。您是项目的根源吗?
发件人:https://github.com/visionmedia/debug/issues/261
如果您是Node / github / etc的新手,那么您可能正在做我 做到了-克隆了一个repo然后忘记了cd进入repo目录- 所以npm找不到package.json文件,所以它给你那么大 复杂的错误消息。
我猜你在运行测试的目录中有一个package.json文件?
答案 1 :(得分:0)
在日志底部附近出现此错误:
npm ERR! syscall spawn git
这意味着您的计算机上尚未安装git。您需要从以下位置安装git:https://git-scm.com/downloads。
我和你有同样的问题,一旦我安装了git,问题就消失了。
答案 2 :(得分:0)
我在使用 NextJS 时遇到了类似的错误。我解决了这个问题,只需再次运行 yarn dev 即可。你应该在安装 npm-packages 之后再做。