Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

reactjs - NPM Package not found but found on website

so I am trying to install

https://www.npmjs.com/package/@progress/kendo-react-grid

the package exists on the website but when I run the command

 npm i @progress/kendo-react-grid

I get a 404 error

Ideas ?

So far I think the user scope is what is messing it up

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 [email protected]
3 info using [email protected]
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)

Second Attempt

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 [email protected]
npm info using [email protected]
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 [email protected]
npm info using [email protected]
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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It looks like you were not able to reach the npm-public registry, follow below steps:

1) You can set npm-public registry URL by hitting below command from the terminal.

npm set registry http://registry.npmjs.org/.

2) Then clear the npm cache using npm cache clean --force.

3)Then open your .npmrc file, you can find and open the same using gedit ~/.npmrc command and add below line in it:

@progress:registry=http://registry.npmjs.org/

Then hit npm i @progress/kendo-react-grid --verbose command.

Hope this will work for you!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...