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 run develop on a fresh install doesn't work #524

Closed
wschenk opened this issue Oct 29, 2016 · 24 comments
Closed

npm run develop on a fresh install doesn't work #524

wschenk opened this issue Oct 29, 2016 · 24 comments

Comments

@wschenk
Copy link

wschenk commented Oct 29, 2016

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

> [email protected] develop /private/tmp/testsite
> gatsby develop

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

Love to give it a try!

@codinronan
Copy link

@wschenk instead of using npm run develop try gatsby develop

Shouldn't matter but... @KyleAMathews would need to comment.

I just recently installed it and it does work for me.

@cmjio
Copy link

cmjio commented Oct 29, 2016

Same issue here too, tried with gatsby and npm.

@wschenk
Copy link
Author

wschenk commented Oct 29, 2016

I reinstalled node and npm and it's working now, so it must be some versioning thing...

@KyleAMathews
Copy link
Contributor

Will and Chris -- what versions of node/npm were/are you on?
On Sat, Oct 29, 2016 at 4:49 PM Will Schenk [email protected]
wrote:

I reinstalled node and npm and it's working now, so it must be some
versioning thing...


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#524 (comment),
or mute the thread
https:/notifications/unsubscribe-auth/AAEVh7joSTtL7lepihhDsPxRzguDieTMks5q49uOgaJpZM4KkMmL
.

@ghost
Copy link

ghost commented Oct 30, 2016

I'm using Node 7.0 and getting this.

@joevillanueva
Copy link

joevillanueva commented Oct 30, 2016

Getting the same error with Node v6.9.1 and NPM v3.10.8, tried both aforementioned methods, no dice.

@mchenja
Copy link

mchenja commented Oct 30, 2016

I'm also getting this error with Node v7.0.0 and NPM v3.10.8, on macOS 10.12.1.

@lichtner
Copy link

same error on ubuntu 14.04 and node 6.9.1 and npm 3.10.9

@d2s
Copy link

d2s commented Oct 30, 2016

Same error here.

$ gatsby develop
wrong type of arguments with: 8000
$ node --version
v6.7.0

$ npm --version
3.10.3

Website project’s package.json has these dependencies:

"dependencies": {
  "chroma-js": "1.1.1",
  "color-pairs-picker": "^1.3.5",
  "gatsby": "^1.0.0-alpha7",
  "lodash": "^3.10.1",
  "react": "^0.14.3",
  "react-document-title": "^2.0.1",
  "react-dom": "0.14.3",
  "react-responsive-grid": "^0.3.3",
  "react-router": "^0.13.3",
  "react-style-normalizer": "1.2.8",
  "typography": "0.3.6"
}

@cmjio
Copy link

cmjio commented Oct 30, 2016

node 7.0.0, npm 3.10.3

@KyleAMathews
Copy link
Contributor

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.

@KyleAMathews
Copy link
Contributor

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

@bkonkle
Copy link
Contributor

bkonkle commented Oct 30, 2016

Ouch, somehow I'm getting bitten by this even though I've got "gatsby": "^0.12.18", in my package.json. This is confusing. 😅 I'm trying to thoroughly clean my environment to see if the alpha is cached somewhere.

@KyleAMathews
Copy link
Contributor

Does running "gatsby develop" work?
On Sun, Oct 30, 2016 at 12:40 PM Brandon Konkle [email protected]
wrote:

Ouch, somehow I'm getting bitten by this even though I've got "gatsby":
"^0.12.18", in my package.json. This is confusing. 😅 I'm trying to
thoroughly clean my environment to see if the alpha is cached somewhere.


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#524 (comment),
or mute the thread
https:/notifications/unsubscribe-auth/AAEVh9HYuuM-cNjGBkOzYT-lTdVojlvDks5q5PKugaJpZM4KkMmL
.

@bkonkle
Copy link
Contributor

bkonkle commented Oct 30, 2016

Nope, same result. I'm doing a bisect now to see where the problem is introduced, starting with the previous version I was on: 0.12.0.

@bkonkle
Copy link
Contributor

bkonkle commented Oct 30, 2016

There we go - introduced in 8caa0cf, merged in 0.12.3. I'm looking for a fix.

@bkonkle
Copy link
Contributor

bkonkle commented Oct 30, 2016

The error message comes from detect-port.

@bkonkle
Copy link
Contributor

bkonkle commented Oct 30, 2016

Here it is - it needs to default to a number. PR incoming.

KyleAMathews referenced this issue in node-modules/detect-port Oct 31, 2016
KyleAMathews pushed a commit that referenced this issue Oct 31, 2016
* Parse the port to a number if needed, further fixing #524

* Fix the reassignment of program.port
@KyleAMathews
Copy link
Contributor

KyleAMathews commented Oct 31, 2016

@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.

@KyleAMathews
Copy link
Contributor

0.12.19 is out! Thanks to everyone for helping out!

@wschenk
Copy link
Author

wschenk commented Oct 31, 2016

Thanks!

On Sun, Oct 30, 2016 at 8:32 PM, Kyle Mathews [email protected]
wrote:

0.12.19 is out! Thanks to everyone for helping out!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#524 (comment),
or mute the thread
https:/notifications/unsubscribe-auth/AAAvyDmESHYenpzc4ptDNuWb3nS3AN51ks5q5TcwgaJpZM4KkMmL
.

Will Schenk
http://happyfuncorp.com
http://sublimeguile.com

KyleAMathews pushed a commit that referenced this issue Nov 1, 2016
* Parse the port to a number if needed, further fixing #524

* Fix the reassignment of program.port
@davegomez
Copy link

davegomez commented Apr 11, 2017

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

@KyleAMathews
Copy link
Contributor

@davegomez hmmm not sure why that babel error is happening. Are you requiring a file outside of the site root? Perhaps try removing node_modules and reinstalling?

@jurosh
Copy link
Contributor

jurosh commented Sep 26, 2017

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests