gatsby: npm run develop on a fresh install doesn't work

combray:testsite wschenk$ npm install -g gatsby
combray:testsite wschenk$ gatsby new testsite
combray:tmp wschenk$ cd testsite
combray:testsite wschenk$ npm run develop

> gatsby-starter-default@1.0.0 develop /private/tmp/testsite
> gatsby develop

wrong type of arguments with: 8000
combray:testsite wschenk$ 

Love to give it a try!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Also running into Module build failed: Error: Couldn't find preset "es2015" relative to directory on fresh install with yarn & npm (tried with clear node_modules with both)… with gatsby cli 1.1.7 and gatsby dependency 1.9.42

Edit: Adding .babelrc with { "presets": ["es2015"] } and installing babel-preset-es2015 hotfixed issue and I can start fresh gatsby installation…

0.12.19 is out! Thanks to everyone for helping out!

@bkonkle thanks!

So the root problem ended up being that detect-port added a runtime check that the port number was a number and released it in a patch release a few days ago which is why everyone just started seeing problems…

@bkonkle’s PR fixes this and I’ll make a new release shortly.

I’m going to add a deploy script that’ll check for this sort of thing to ensure this doesn’t happen again.

I’m getting the next error in a new project using Gatsby 1.0.0-alpha12 installed globally and when I run gatsby --version shows 0.12.41.

I’m using Node 7.8.0 with NPM 4.4.4 and Yarn 0.22.0.

This is the error output for gatsby develop:

bin/gatsby: time since started: 0.052
initial loading: 1197.546ms
(node:75197) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Failed to require /Users/username/Development/personal/website.github.io/html.js
./html.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/username/Development/personal"
    at /Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/username/Development/personal/website.github.io/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/username/Development/personal/website.github.io/node_modules/babel-loader/lib/index.js:46:20)
    at /Users/username/Development/personal/website.github.io/node_modules/babel-loader/lib/fs-cache.js:79:18
    at ReadFileContext.callback (/Users/username/Development/personal/website.github.io/node_modules/babel-loader/lib/fs-cache.js:15:14)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)

 @ (webpack)-require/lib/webpackRequireEntrypoint.js 1:20-41

Gah so sorry everyone — I published the latest 1.0.0 alpha without its “next” tag which meant NPM thinks it’s the default. I’ve reverted “default” back to 0.12.18 so if you delete the starter you installed and reinstall it, things should be work again. @d2s thanks for posting your package.json — seeing the Gatsby 1.0.0-alpha7 helped figure out what was wrong.