javascript - npm install 返回 304 和 404 错误而不是安装包
问题描述
当我跑步时,npm install
我会看到很多这样的:
npm http fetch GET 304 http://registry.npmjs.org/is-arrayish 60ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/spdx-license-ids 67ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/spdx-exceptions 72ms (from cache)
npm http fetch GET 200 http://registry.npmjs.org/arr-union 11ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/is-buffer 68ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/is-data-descriptor 85ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/is-accessor-descriptor 90ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/is-accessor-descriptor 72ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/is-data-descriptor 66ms (from cache)
npm http fetch GET 200 http://registry.npmjs.org/has-value 6ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/p-try 92ms (from cache)
npm http fetch GET 200 http://registry.npmjs.org/set-value 12ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/posix-character-classes 68ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/static-extend 88ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/for-in 89ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/get-value 72ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/collection-visit 88ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/to-object-path 64ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/union-value 85ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/os-homedir 81ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/unset-value 87ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/delegates 76ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/aproba 82ms (from cache)
npm http fetch GET 200 http://registry.npmjs.org/map-visit 8ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/has-unicode 76ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/wide-align 73ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/capture-stack-trace 69ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/prepend-http 83ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/has-values 81ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/object-copy 61ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/object-visit 53ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/code-point-at 52ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/pseudomap 84ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/has-values 53ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/copy-descriptor 42ms (from cache)
npm http fetch GET 304 http://registry.npmjs.org/number-is-nan 76ms (from cache)
npm http fetch GET 404 http://registry.npmjs.org/@apollographql%2fapollo-tools 726ms
npm timing stage:rollbackFailedOptional Completed in 0ms
npm timing stage:runTopLevelLifecycles Completed in 6589ms
npm ERR! code E404
npm ERR! 404 Not Found: @apollographql/apollo-tools@^0.4.0
npm timing npm Completed in 6995ms
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/paulcarron/.npm/_logs/2019-10-01T19_18_38_895Z-debug.log
我不确定为什么我的包无法安装。我有一个模糊的回忆,我在一段时间前更新了 npm url,但这里的 url 看起来不错。有什么建议么?
解决方案
到了它的底部。我删除了我的应用程序文件夹的内容并将一组新的程序文件复制到其中。我没有注意到的是,当我删除我的终端时,我的终端遵循了我已删除文件的路径,因此基本上指向垃圾桶中的一个位置,这似乎导致了npm install
.
更改到正确的目录并npm install
再次运行解决了该问题。
推荐阅读
- json - 从 Oracle 12c Enterprise Ed (12.1.0) 中的列值生成 JSON - 64 位
- r - 为流程中跳过的阶段添加行
- ios - 如何在 WKWebView 中自动播放 youtube 视频?
- pandas - 如何在操作后将两个 NaN 设为 NaN 而不是将其设为零?
- java - 用于插入 css 的 mvc 资源中的错误
- spring - configuration.setAllowedOrigins 不允许定义多个域名
- typescript - 打字稿将减速器类型转换为动作
- android - 即使我在发送意图时坐在 putExtra 上,意图在 MyAlarm 类的 onReceive 中为空
- python-3.x - “模块”对象在合并函数中不可调用
- c++ - 每个缓冲区或整个程序的大小前缀是什么?