fabien0102 / gatsby-starter

Gatsby 2.0 starter with typescript and many cools dev tools
386 stars 99 forks source link

npm ERR! notarget No matching version found for gatsby@next #88

Closed AbhimanyuAryan closed 5 years ago

AbhimanyuAryan commented 5 years ago

After gatsby build I'm deploying my blog to Gitlab. But I get this error. Can someone help me fix this & why I'm getting this error?

Troubleshooting: I have removed yarn.lock & did yarn install again. But still, I get this error

Checking out e6f33d2c as master...
Skipping Git submodules setup
Checking cache for default...
FATAL: file does not exist                         
Failed to extract cache
$ npm install
npm WARN deprecated codeclimate-test-reporter@0.4.1: codeclimate-test-reporter has been deprecated in favor of our new unified test-reporter. Please visit https://docs.codeclimate.com/docs/configuring-test-coverage for details on setting up the new test-reporter.
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated   npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for gatsby@next
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 'abhimanyuaryan.gitlab.io'
npm ERR! notarget 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-10T22_01_23_081Z-debug.log
ERROR: Job failed: exit code 1
AbhimanyuAryan commented 5 years ago

Even your latest blog(on gatsby2) has a build fail

➜  gatsby-starter git:(master) ✗ npm install
npm WARN deprecated codeclimate-test-reporter@0.4.1: codeclimate-test-reporter has been deprecated in favor of our new unified test-reporter. Please visit https://docs.codeclimate.com/docs/configuring-test-coverage for details on setting up the new test-reporter.
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated   npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! code ETARGET
npm ERR! notarget No matching version found for gatsby-link@next
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 'gatsby-starter'
npm ERR! notarget
fabien0102 commented 5 years ago

Hello @AbhimanyuAryan, sorry for the late response, monday is always a busy day at work ^^

So apparently gatsby-link don't have any next version published anymore 😕 so can try to fix the version as it is in the package-lock.json -> 2.0.0-rc.2 (so npm i gatsby-link@2.0.0-rc.2), or take the latest tag instead of the next

Or, if you don't want to fight with all breaking changes and version, you can use the package-lock.json fixed versions by using npm ci instead of npm install (you need a recent version of node/npm but this command is just magic https://docs.npmjs.com/cli/ci.html)

Have fun!

AbhimanyuAryan commented 5 years ago

changed to latest. Thanks a lot 💯