Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install -g gatsby-cli not working #26266

Closed
loalexzzzz opened this issue Aug 6, 2020 · 26 comments
Closed

npm install -g gatsby-cli not working #26266

loalexzzzz opened this issue Aug 6, 2020 · 26 comments
Labels
type: question or discussion Issue discussing or asking a question about Gatsby type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@loalexzzzz
Copy link

loalexzzzz commented Aug 6, 2020

Any help would be appreciate! Thanks.

Window10
image

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'gatsby-cli' ]
2 info using npm@6.4.1
3 info using node@v10.14.2
4 verbose npm-session e4362b76590ce158
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/gatsby-cli 117ms (from cache)
8 silly pacote tag manifest for gatsby-cli@latest fetched in 142ms
9 timing stage:loadCurrentTree Completed in 289ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule gatsby-cli@2.12.77 checking installable status
17 http fetch GET 404 https://registry.npmjs.org/@hapi%2fjoi 54ms
18 silly fetchPackageMetaData error for @hapi/joi@^15.1.1 404 Not Found: @hapi/joi@^15.1.1
19 http fetch GET 304 https://registry.npmjs.org/clipboardy 70ms (from cache)
20 silly pacote range manifest for clipboardy@^2.3.0 fetched in 72ms
21 silly resolveWithNewModule clipboardy@2.3.0 checking installable status
22 http fetch GET 304 https://registry.npmjs.org/convert-hrtime 71ms (from cache)
23 http fetch GET 304 https://registry.npmjs.org/chalk 74ms (from cache)
24 silly pacote range manifest for convert-hrtime@^3.0.0 fetched in 73ms
25 silly resolveWithNewModule convert-hrtime@3.0.0 checking installable status
26 silly pacote range manifest for chalk@^2.4.2 fetched in 77ms
27 silly resolveWithNewModule chalk@2.4.2 checking installable status
28 http fetch GET 304 https://registry.npmjs.org/common-tags 77ms (from cache)
29 http fetch GET 304 https://registry.npmjs.org/envinfo 76ms (from cache)
30 silly pacote range manifest for common-tags@^1.8.0 fetched in 82ms
31 silly resolveWithNewModule common-tags@1.8.0 checking installable status
32 silly pacote range manifest for envinfo@^7.5.1 fetched in 81ms
33 silly resolveWithNewModule envinfo@7.7.2 checking installable status
34 http fetch GET 304 https://registry.npmjs.org/configstore 97ms (from cache)
35 http fetch GET 304 https://registry.npmjs.org/better-opn 99ms (from cache)
36 http fetch GET 304 https://registry.npmjs.org/execa 46ms (from cache)
37 silly pacote range manifest for configstore@^5.0.1 fetched in 100ms
38 silly resolveWithNewModule configstore@5.0.1 checking installable status
39 silly pacote range manifest for better-opn@^1.0.0 fetched in 102ms
40 silly resolveWithNewModule better-opn@1.0.0 checking installable status
41 silly pacote range manifest for execa@^3.4.0 fetched in 49ms
42 silly resolveWithNewModule execa@3.4.0 checking installable status
43 http fetch GET 304 https://registry.npmjs.org/@types%2fcommon-tags 106ms (from cache)
44 silly pacote range manifest for @types/common-tags@^1.8.0 fetched in 114ms
45 silly resolveWithNewModule @types/common-tags@1.8.0 checking installable status
46 http fetch GET 200 https://registry.npmjs.org/hosted-git-info 15ms (from cache)
47 silly pacote range manifest for hosted-git-info@^3.0.4 fetched in 21ms
48 silly resolveWithNewModule hosted-git-info@3.0.5 checking installable status
49 http fetch GET 304 https://registry.npmjs.org/@babel%2fcode-frame 127ms (from cache)
50 http fetch GET 200 https://registry.npmjs.org/is-valid-path 12ms (from cache)
51 silly pacote range manifest for @babel/code-frame@^7.10.3 fetched in 132ms
52 silly resolveWithNewModule @babel/code-frame@7.10.4 checking installable status
53 silly pacote range manifest for is-valid-path@^0.1.1 fetched in 16ms
54 silly resolveWithNewModule is-valid-path@0.1.1 checking installable status
55 http fetch GET 304 https://registry.npmjs.org/fs-exists-cached 66ms (from cache)
56 silly pacote range manifest for fs-exists-cached@^1.0.0 fetched in 67ms
57 silly resolveWithNewModule fs-exists-cached@1.0.0 checking installable status
58 http fetch GET 304 https://registry.npmjs.org/fs-extra 64ms (from cache)
59 silly pacote range manifest for fs-extra@^8.1.0 fetched in 72ms
60 silly resolveWithNewModule fs-extra@8.1.0 checking installable status
61 http fetch GET 304 https://registry.npmjs.org/gatsby-core-utils 87ms (from cache)
62 silly pacote range manifest for gatsby-core-utils@^1.3.15 fetched in 95ms
63 silly resolveWithNewModule gatsby-core-utils@1.3.15 checking installable status
64 http fetch GET 304 https://registry.npmjs.org/ink-spinner 78ms (from cache)
65 silly pacote range manifest for ink-spinner@^3.1.0 fetched in 82ms
66 silly resolveWithNewModule ink-spinner@3.1.0 checking installable status
67 http fetch GET 304 https://registry.npmjs.org/gatsby-telemetry 109ms (from cache)
68 silly pacote range manifest for gatsby-telemetry@^1.3.26 fetched in 115ms
69 silly resolveWithNewModule gatsby-telemetry@1.3.26 checking installable status
70 http fetch GET 304 https://registry.npmjs.org/lodash 75ms (from cache)
71 http fetch GET 304 https://registry.npmjs.org/meant 69ms (from cache)
72 silly pacote range manifest for lodash@^4.17.15 fetched in 79ms
73 silly resolveWithNewModule lodash@4.17.19 checking installable status
74 silly pacote range manifest for meant@^1.0.1 fetched in 71ms
75 silly resolveWithNewModule meant@1.0.2 checking installable status
76 http fetch GET 304 https://registry.npmjs.org/ink 105ms (from cache)
77 silly pacote range manifest for ink@^2.7.1 fetched in 109ms
78 silly resolveWithNewModule ink@2.7.1 checking installable status
79 http fetch GET 304 https://registry.npmjs.org/gatsby-recipes 130ms (from cache)
80 http fetch GET 304 https://registry.npmjs.org/pretty-error 66ms (from cache)
81 http fetch GET 304 https://registry.npmjs.org/opentracing 79ms (from cache)
82 silly pacote range manifest for gatsby-recipes@^0.2.7 fetched in 137ms
83 silly resolveWithNewModule gatsby-recipes@0.2.7 checking installable status
84 silly pacote range manifest for pretty-error@^2.1.1 fetched in 69ms
85 silly resolveWithNewModule pretty-error@2.1.1 checking installable status
86 http fetch GET 304 https://registry.npmjs.org/node-fetch 92ms (from cache)
87 silly pacote range manifest for opentracing@^0.14.4 fetched in 86ms
88 silly resolveWithNewModule opentracing@0.14.4 checking installable status
89 silly pacote range manifest for node-fetch@^2.6.0 fetched in 97ms
90 silly resolveWithNewModule node-fetch@2.6.0 checking installable status
91 http fetch GET 304 https://registry.npmjs.org/progress 79ms (from cache)
92 silly pacote range manifest for progress@^2.0.3 fetched in 81ms
93 silly resolveWithNewModule progress@2.0.3 checking installable status
94 http fetch GET 304 https://registry.npmjs.org/prompts 72ms (from cache)
95 http fetch GET 304 https://registry.npmjs.org/redux 58ms (from cache)
96 http fetch GET 304 https://registry.npmjs.org/resolve-cwd 60ms (from cache)
97 silly pacote range manifest for prompts@^2.3.2 fetched in 78ms
98 silly resolveWithNewModule prompts@2.3.2 checking installable status
99 silly pacote range manifest for redux@^4.0.5 fetched in 63ms
100 silly resolveWithNewModule redux@4.0.5 checking installable status
101 silly pacote range manifest for resolve-cwd@^3.0.0 fetched in 64ms
102 silly resolveWithNewModule resolve-cwd@3.0.0 checking installable status
103 http fetch GET 304 https://registry.npmjs.org/semver 54ms (from cache)
104 silly pacote range manifest for semver@^6.3.0 fetched in 62ms
105 silly resolveWithNewModule semver@6.3.0 checking installable status
106 http fetch GET 200 https://registry.npmjs.org/yurnalist 12ms (from cache)
107 silly pacote range manifest for yurnalist@^1.1.2 fetched in 17ms
108 silly resolveWithNewModule yurnalist@1.1.2 checking installable status
109 http fetch GET 304 https://registry.npmjs.org/stack-trace 60ms (from cache)
110 http fetch GET 304 https://registry.npmjs.org/source-map 64ms (from cache)
111 http fetch GET 304 https://registry.npmjs.org/signal-exit 67ms (from cache)
112 http fetch GET 304 https://registry.npmjs.org/react 89ms (from cache)
113 silly pacote range manifest for stack-trace@^0.0.10 fetched in 65ms
114 silly resolveWithNewModule stack-trace@0.0.10 checking installable status
115 silly pacote version manifest for source-map@0.7.3 fetched in 71ms
116 silly resolveWithNewModule source-map@0.7.3 checking installable status
117 silly pacote range manifest for signal-exit@^3.0.3 fetched in 72ms
118 silly resolveWithNewModule signal-exit@3.0.3 checking installable status
119 silly pacote range manifest for react@^16.8.0 fetched in 95ms
120 silly resolveWithNewModule react@16.13.1 checking installable status
121 http fetch GET 304 https://registry.npmjs.org/strip-ansi 65ms (from cache)
122 http fetch GET 304 https://registry.npmjs.org/update-notifier 41ms (from cache)
123 silly pacote range manifest for strip-ansi@^5.2.0 fetched in 66ms
124 silly resolveWithNewModule strip-ansi@5.2.0 checking installable status
125 silly pacote range manifest for update-notifier@^4.1.0 fetched in 43ms
126 silly resolveWithNewModule update-notifier@4.1.0 checking installable status
127 http fetch GET 304 https://registry.npmjs.org/uuid 47ms (from cache)
128 silly pacote version manifest for uuid@3.4.0 fetched in 48ms
129 silly resolveWithNewModule uuid@3.4.0 checking installable status
130 http fetch GET 304 https://registry.npmjs.org/yargs 47ms (from cache)
131 silly pacote range manifest for yargs@^15.3.1 fetched in 50ms
132 silly resolveWithNewModule yargs@15.4.1 checking installable status
133 timing stage:rollbackFailedOptional Completed in 1ms
134 timing stage:runTopLevelLifecycles Completed in 625ms
135 verbose stack Error: 404 Not Found: @hapi/joi@^15.1.1
135 verbose stack at fetch.then.res (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
135 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
135 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
135 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
135 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
135 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
135 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
135 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
135 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
135 verbose stack at runCallback (timers.js:705:18)
135 verbose stack at tryOnImmediate (timers.js:676:5)
135 verbose stack at processImmediate (timers.js:658:5)
136 verbose cwd C:\Users\Alex\IdeaProjects
137 verbose Windows_NT 10.0.18363
138 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "gatsby-cli"
139 verbose node v10.14.2
140 verbose npm v6.4.1
141 error code E404
142 error 404 Not Found: @hapi/joi@^15.1.1
143 verbose exit [ 1, true ]

@loalexzzzz loalexzzzz added the type: question or discussion Issue discussing or asking a question about Gatsby label Aug 6, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 6, 2020
@ahmetcanaydemir
Copy link
Contributor

Related with hapijs/joi#2411

@pieh
Copy link
Contributor

pieh commented Aug 6, 2020

It seems like npm registry have issues with installing "scoped packages" ( https://status.npmjs.org/incidents/cksjqc1w11v5 ) and @hapi/joi is scoped package - so this seems like npm issue

@loalexzzzz
Copy link
Author

Related with sideway/joi#2411

What should I do then? 😥

@pieh
Copy link
Contributor

pieh commented Aug 6, 2020

Related with sideway/joi#2411

Unless they remove/delete package completely from registry (and not just deprecate it), it will continue to work (well, if there are no npm issues that is :/)

@artrn-nt
Copy link

artrn-nt commented Aug 6, 2020

I've got the same problem here!
Capture d’écran 2020-08-06 à 11 31 10

@pieh pieh added type: upstream Issues outside of Gatsby's control, caused by dependencies and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 6, 2020
@amboton1
Copy link

amboton1 commented Aug 6, 2020

Same problem
image

@pieh
Copy link
Contributor

pieh commented Aug 6, 2020

Folks, please track https://status.npmjs.org/incidents/cksjqc1w11v5 - this is npm "incident". 10 minutes ago they reported

We are still looking into error telemetry for installation of scoped packages but are seeing signs of improvement.

so it might already been resolved, but they didn't change the overall incident to resolved yet as they monitor errors still

@loalexzzzz
Copy link
Author

Folks, please track https://status.npmjs.org/incidents/cksjqc1w11v5 - this is npm "incident". 10 minutes ago they reported

We are still looking into error telemetry for installation of scoped packages but are seeing signs of improvement.

so it might already been resolved, but they didn't change the overall incident to resolved yet as they monitor errors still

thanks for letting us know that they are fixing.

@pieh
Copy link
Contributor

pieh commented Aug 6, 2020

I also just try installing globally again now and it worked, so for all folks I recommend retrying now

@loalexzzzz
Copy link
Author

image
another error come out

@amboton1
Copy link

amboton1 commented Aug 6, 2020

image

@ghost
Copy link

ghost commented Aug 6, 2020

Its seems it's only partially fixed. Original package is installing but now I get this.
error
Guess we have to wait for NPM to sort it out.

@marcosilvestroni
Copy link

It's the same in yarn registry

@ghost
Copy link

ghost commented Aug 6, 2020

Seems to get a little further each time I run npm i -g gatsby-cli

@hendhyhutomo
Copy link

Same 404 Error as well on Netlify Gatsby Build

6:12:03 PM: error An unexpected error occurred: "https://registry.yarnpkg.com/@material-ui/core/-/core-4.11.0.tgz: Request failed \"404 Not Found\"".

@webbson
Copy link

webbson commented Aug 6, 2020

Same 404 Error as well on Netlify Gatsby Build

6:12:03 PM: error An unexpected error occurred: "https://registry.yarnpkg.com/@material-ui/core/-/core-4.11.0.tgz: Request failed \"404 Not Found\"".

Me too on different repos each time. Last it was
1:22:12 PM: 404 '@vimeo/player@2.6.5' is not in the npm registry.

@hendhyhutomo
Copy link

I am actually slightly glad that it is a global issue. I thought there was something wrong with my build

@samsara-ku
Copy link

Me too, same issue :(

image

@ghost
Copy link

ghost commented Aug 6, 2020

All seems okay now for me. Hopefully its resolved for everyone now.

@ahmetcanaydemir
Copy link
Contributor

Yes, fixed!

@loalexzzzz
Copy link
Author

thanks all.

@amboton1
Copy link

amboton1 commented Aug 6, 2020

Seems fine! Thanks to all :)

@hendhyhutomo
Copy link

Everything seems good now! Thanks!

@synerjay
Copy link

It's 2021 and still having this problem.... How did you guys fixed it?

@synerjay
Copy link

Getting this erro:

npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN express-graphql@0.9.0 requires a peer of graphql@^14.4.1 but none is installed. You must install peer dependencies yourself.

npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13

@ws333
Copy link

ws333 commented Apr 21, 2021

@synerjay

You need write permission on the node_modules folder (see line 6 in your log):
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

You might need to use sudo and change the owner of the node_modules folder.
See how-to-fix-eacces-errors-with-npm-on-macos/
Should be a similar solution if you're using linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Issue discussing or asking a question about Gatsby type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
Development

No branches or pull requests