npm WARN read-shrinkwrap This version of npm is compatible with
lockfileVersion@1, but npm-shrinkwrap.json was generated for
lockfileVersion@0. I'll try to do my best with it!
npm ERR! code ETARGET
npm ERR! notarget No matching version found for sockjs-client@0.0.0-
unreleasable
npm ERR! notarget In most cases you or one of your dependencies are
requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'shoe'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2018-08-27T12_19_24_084Z-debug.log
Run Code Online (Sandbox Code Playgroud)
我在安装软件包时遇到此错误,它不允许我安装软件包,请帮助。
提前致谢
小智 13
尝试以下步骤来解决该错误
第 1 步 - 删除您的 node_modules 文件夹
rm -rf node_modules
Run Code Online (Sandbox Code Playgroud)
第2步 -
npm 缓存清理
步骤 3 -
sudo apt-get install build-essential
第 4 步 - 删除 package-lock.json 并再次安装节点模块。
npm 安装
(如果出现 EACCESS 错误,请尝试使用 sudo 命令。)
npm update\xe2\x80\x9ccode ETARGET\xe2\x80\x9d \xe2\x80\x9cnotarget Nomatching version found forexpress@4.17.1\xe2\x80\x9d (运行时)的原因之一prefer-offline=true在npm配置中,导致npm (特别是npm-registry-cache)在获取现有资源时永远不会更新其 HTTP 缓存。 prefer-offline对于加快速度很有用npm ci,但如果您将其用于npm update,那么npm/ pacote将永远缓存包元数据请求又名包(例如 GET https://registry.npmjs.org/express),并且将无法更新到最新版本版本。因此prefer-offline=true,cache-min=9999如果您offline=true在 npm CLI 标志、环境变量或npmrc 文件(/path/to/my/project/.npmrc、等)中设置了 、 、 ,那么不要在执行和~/.npmrc时忘记删除它们。npm updatenpm install
据我所知,要点是:
\n--prefer-offline在运行npm install,npm update等时使用npm outdated,则偶尔删除--prefer-offline或npm cache clean。npm ci --prefer-offline而不是npm install --prefer-offline| 归档时间: |
|
| 查看次数: |
73921 次 |
| 最近记录: |