gpt4 book ai didi

javascript - npm install 找不到新版本

转载 作者:行者123 更新时间:2023-11-30 06:27:03 27 4
gpt4 key购买 nike

我只是想在 Mac 上执行 sudo npm install,具有以下依赖项:

"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-jshint": "~0.6.3",
"grunt-contrib-nodeunit": "~0.6.3",
"grunt-contrib-uglify": "~0.6.3"
},

但是 npm 一直告诉我:

npm ERR! notarget No compatible version found: grunt-contrib-uglify@'>=0.6.3-0 <0.7.0-0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["0.1.0","0.1.1","0.1.2","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.1.1-rc5","0.1.1-rc6"]

uglify 也会发生同样的事情,当我确定我想要的版本存在时,我在 Windows 上的 friend 能够使用相同的 package.json 安装就好了

我担心我的版本,所以我安装了最新版本的 Node 和 npm,并运行 sudo npm update npm -g,没有解决问题

109 error node -v v0.10.22
110 error npm -v 1.3.15
111 error code ETARGET
112 verbose exit [ 1, true ]

调试日志中的更多内容

97 silly addNameRange number 2 { name: 'grunt-contrib-uglify',
97 silly addNameRange range: '>=0.6.3-0 <0.7.0-0',
97 silly addNameRange hasData: true }
98 silly addNameRange versions [ 'grunt-contrib-uglify',
98 silly addNameRange [ '0.1.0',
98 silly addNameRange '0.1.1',
98 silly addNameRange '0.1.2',
98 silly addNameRange '0.2.0',
98 silly addNameRange '0.2.1',
98 silly addNameRange '0.2.2',
98 silly addNameRange '0.2.3',
98 silly addNameRange '0.2.4',
98 silly addNameRange '0.2.5',
98 silly addNameRange '0.2.6',
98 silly addNameRange '0.2.7',
98 silly addNameRange '0.1.1-rc5',
98 silly addNameRange '0.1.1-rc6' ] ]
99 silly lockFile 9c3f05fb-grunt-contrib-uglify-0-6-3 grunt-contrib-uglify@~0.6.3
100 silly lockFile 9c3f05fb-grunt-contrib-uglify-0-6-3 grunt-contrib-uglify@~0.6.3

101 silly addNameRange number 2 { name: 'grunt-contrib-nodeunit',
101 silly addNameRange range: '>=0.6.3-0 <0.7.0-0',
101 silly addNameRange hasData: true }
102 silly addNameRange versions [ 'grunt-contrib-nodeunit',
102 silly addNameRange [ '0.1.0',
102 silly addNameRange '0.1.1',
102 silly addNameRange '0.1.2',
102 silly addNameRange '0.2.0',
102 silly addNameRange '0.2.1',
102 silly addNameRange '0.2.2',
102 silly addNameRange '0.1.2-rc5',
102 silly addNameRange '0.1.2-rc6' ] ]
103 silly lockFile 77c5bd75-grunt-contrib-nodeunit-0-6-3 grunt-contrib-nodeunit@~0.6.3
104 silly lockFile 77c5bd75-grunt-contrib-nodeunit-0-6-3 grunt-contrib-nodeunit@~0.6.3
105 error notarget No compatible version found: grunt-contrib-uglify@'>=0.6.3-0 <0.7.0-0'

最佳答案

试试这个:npm install grunt-contrib-uglify --save-dev...它会把最新版本下载到你的电脑上,并将版本保存到你的 package.json有 uglify 的文档在知乎上

关于javascript - npm install 找不到新版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20416819/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com