所以我正在尝试安装
https://www.npmjs.com/package/@progress/kendo-react-grid
该软件包存在于网站上但是当我运行命令时
npm i @progress/kendo-react-grid
我收到404错误
想法?
到目前为止,我认为用户范围正在弄乱它
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'i',
1 verbose cli '@progress/kendo-react-grid' ]
2 info using npm@5.7.1
3 info using node@v8.9.4
4 verbose npm-session 8a16ec43dbb6fa7f
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 https://registry.npmjs.org/@progress%2fkendo-react-grid 845ms
8 silly fetchPackageMetaData error for @progress/kendo-react-grid@latest 404 Not Found: @progress/kendo-react-grid@latest
9 verbose stack Error: 404 Not Found: @progress/kendo-react-grid@latest
9 verbose stack at fetch.then.res (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
9 verbose stack at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
9 verbose stack at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
9 verbose stack at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
9 verbose stack at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
9 verbose stack at Async._drainQueue (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
9 verbose stack at Async._drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
第二次尝试
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli 'i',
npm verb cli '@progress/kendo-react-grid',
npm verb cli '--verbose' ]
npm info using npm@5.7.1
npm info using node@v8.9.4
npm verb npm-session b5bf7033664f004a
npm verb stack TypeError: Only absolute URLs are supported
npm verb stack at getNodeRequestOptions (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/request.js:131:11)
npm verb stack at fetch.Promise (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:44:21)
npm verb stack at new Promise (<anonymous>)
npm verb stack at fetch (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:41:10)
root@NA-MC-PRO4-MA:/mnt/c/Workspace# npm i @progress/kendo-react-grid --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli 'i',
npm verb cli '@progress/kendo-react-grid',
npm verb cli '--verbose' ]
npm info using npm@5.7.1
npm info using node@v8.9.4
npm verb npm-session 9c84ebec03e4764f
npm verb stack TypeError: Only absolute URLs are supported
npm verb stack at getNodeRequestOptions (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/request.js:131:11)
npm verb stack at fetch.Promise (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:44:21)
npm verb stack at new Promise (<anonymous>)
npm verb stack at fetch (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:41:10)
npm verb stack at retry (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/index.js:332:14)
npm verb stack at /usr/lib/node_modules/npm/node_modules/pacote/node_modules/promise-retry/index.js:29:24
npm verb stack at <anonymous>
npm verb cwd /mnt/c/Workspace
npm verb Linux 4.4.0-43-Microsoft
npm verb argv "/usr/bin/node" "/usr/bin/npm" "i" "@progress/kendo-react-grid" "--verbose"
npm verb node v8.9.4
npm verb npm v5.7.1
npm ERR! Only absolute URLs are supported
npm verb exit [ 1, true ]
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-03-13T20_30_15_208Z-debug.log
答案 0 :(得分:3)
看起来您无法访问npm-public registry
,请按照以下步骤操作:
1)您可以通过从终端点击以下命令来设置npm-public registry
URL。
npm set registry http://registry.npmjs.org/
。
2)然后使用npm
清除npm cache clean --force
缓存。
3)然后打开您的.npmrc
文件,您可以使用gedit ~/.npmrc
命令找到并打开相同的文件,并在其中添加以下行:
@progress:注册表= http://registry.npmjs.org/
然后点击npm i @progress/kendo-react-grid --verbose
命令。
希望这对你有用!
答案 1 :(得分:1)
我查看了我的~/.npmrc
,这就是其中的内容
//registry.npmjs.org/:_password="XXXXXX"
//registry.npmjs.org/:username=XXXXX
//registry.npmjs.org/:email=XXXXXX@XXXXX.xom
//registry.npmjs.org/:always-auth=false
~/.npmrc
#
用于评论See documentation
我评论了所有4行,我能够运行
npm i @progress/kendo-react-grid successfully
无论出于何种原因,我都没有https://www.npmjs.com
上的帐户