Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

netlify dev command fails #110

Closed
JacobDFrank opened this issue Apr 10, 2019 · 14 comments · Fixed by #111
Closed

netlify dev command fails #110

JacobDFrank opened this issue Apr 10, 2019 · 14 comments · Fixed by #111

Comments

@JacobDFrank
Copy link

netlify dev fails after it starts waiting for localhost:8000 for a second or two

  1. Expected Dev Server to start and load on localhost: 8000
  2. Waiting for localhost:8000.% and stops.
  • Tried linking and unlinking and nothing different. Set it up with netlify dev and got deploy working but dev doesn't.
USER%  netlify dev
Netlify Dev ◈ Starting Netlify Dev...
Netlify Dev ◈ Starting Netlify Dev with gatsby
Waiting for localhost:8000.%
USER%

my repo is here and made in gatsby
node v11.6.0 OSX 10.14.4

@swyxio
Copy link
Contributor

swyxio commented Apr 10, 2019

to be clear you shouldnt need to link anything, as long as you have the latest cli version you should be good

thanks for the repo, i am about to go to bed so cant test now but will come round to this tomorrow

@dbvisel
Copy link

dbvisel commented Apr 10, 2019

Same problem here! Also Gatsby, also OS X 10.14.4, node v11.13.0.

@mabhub
Copy link

mabhub commented Apr 10, 2019

Same issue with node v11.10.1, gatsby 2.0.111 (Linux Ubuntu)

@swyxio
Copy link
Contributor

swyxio commented Apr 10, 2019

i'm awake now and on it, thanks for notifying.

@swyxio
Copy link
Contributor

swyxio commented Apr 10, 2019

ok so this happens because you use npm (aka have a package-lock.json) instead of yarn (so would have a yarn.lock), AND we had a bug in our usage of execa where i thought i could substitute 'npm run' for 'yarn' inside its "command": https://github.com/sindresorhus/execa

long story short, i figured out how to fix it and will push a fix soon

@swyxio
Copy link
Contributor

swyxio commented Apr 10, 2019

fixed in https://github.com/netlify/netlify-dev-plugin/releases/tag/v1.0.6 - just update your CLI to v2.11.5 to receive changes

@JacobDFrank
Copy link
Author

Thanks, it runs now but I get a different error and then it fails.

ℹ 「wdm」: Compiling...
 DONE  Compiled successfully in 70ms                                 11:43:23 AM

ℹ 「wdm」:
ℹ 「wdm」: Compiled successfully.
INFO[0018] Reconnecting to tunnel server
INFO[0028] finished client unary call                    error="rpc error: code = Unknown desc = Connection already stablished" grpc.code=Unknown grpc.method=Register grpc.service=tunnel.Tunnel grpc.time_ms=40.562 span.kind=client system=grpc
FATA[0028] can not register client                       error="rpc error: code = Unknown desc = Connection already stablished"

going to create a different issue for this...

@swyxio
Copy link
Contributor

swyxio commented Apr 10, 2019

whaat.. my clone of your repo works..

@swyxio
Copy link
Contributor

swyxio commented Apr 10, 2019

it works!! i swear!
image

ndl         
◈ Netlify Dev ◈
◈ Starting Netlify Dev with gatsby
Waiting for localhost:3000.Lambda server is listening on 34567

Connected!
Waiting for localhost:34567.
Connected!
Waiting for localhost:3000.
Connected!
yarn run v1.12.1
$ npm run develop
npm WARN lifecycle The node binary used for scripts is /var/folders/ts/44xsd07j2sg19xjw0m6lbj880000gn/T/yarn--1554911713381-0.9893646550002844/node but npm is using /Users/swyx/.nvm/versions/node/v10.13.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> thought-at-work-org@0.1.0 develop /Users/swyx/Work/testbeds/tawGatsby2-rearchitecture
> gatsby develop

◈ Creating Live Tunnel for 7fa613f4-0d35-4d1f-b810-439de1bb7ed5

   ┌────────────────────────────────────────────────────────────┐
   │                                                            │
   │                   ◈ Server now ready on                    │
   │   https://vigorous-heisenberg-4662f8-115985.netlify.live   │
   │                                                            │
   └────────────────────────────────────────────────────────────┘

success open and validate gatsby-configs — 0.008 s
success load plugins — 0.344 s
success onPreInit — 1.207 s
success initialize cache — 0.070 s
success copy gatsby files — 0.080 s
success onPreBootstrap — 0.009 s
success source and transform nodes — 0.315 s
success building schema — 0.205 s
success createPages — 0.096 s
success createPagesStatefully — 0.071 s
success onPreExtractQueries — 0.003 s
success update schema — 0.041 s
success extract queries from components — 0.157 s
success run graphql queries — 2.915 s — 36/36 12.36 queries/second
success write out page data — 0.004 s
success write out redirect data — 0.001 s
Generating image thumbnails [==============================] 3/3 2.5 secs 100%
⠄ onPostBootstrapdone generating icons for manifest
success onPostBootstrap — 0.165 s

info bootstrap finished - 10.057 s

 DONE  Compiled successfully in 8153ms                                    11:55:33 AM

 DONE  Compiled successfully in 8153ms                                    11:55:33 AM

 I  Netlify CMS is running at http://localhost:8000/admin/
 DONE  Compiled successfully in 13998ms                                   11:55:39 AM


You can now view thought-at-work-org in the browser.

  http://localhost:8000/

View GraphiQL, an in-browser IDE, to explore your site's data and schema

  http://localhost:8000/___graphql

Note that the development build is not optimized.
To create a production build, use npm run build

boundActionCreators is deprecated. Please use actions instead. For migration instructions, see https://gatsby.dev/boundActionCreators
Check the following files:

gatsby-node.js

ℹ 「wdm」: 
ℹ 「wdm」: Compiled successfully.
> 

@JacobDFrank
Copy link
Author

whaat.. my clone of your repo works..

idk dood, the life of a front-end developer :/

#113

@JacobDFrank
Copy link
Author

it works!! i swear!
image

ndl         
◈ Netlify Dev ◈
◈ Starting Netlify Dev with gatsby
Waiting for localhost:3000.Lambda server is listening on 34567

Connected!
Waiting for localhost:34567.
Connected!
Waiting for localhost:3000.
Connected!
yarn run v1.12.1
$ npm run develop
npm WARN lifecycle The node binary used for scripts is /var/folders/ts/44xsd07j2sg19xjw0m6lbj880000gn/T/yarn--1554911713381-0.9893646550002844/node but npm is using /Users/swyx/.nvm/versions/node/v10.13.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> thought-at-work-org@0.1.0 develop /Users/swyx/Work/testbeds/tawGatsby2-rearchitecture
> gatsby develop

◈ Creating Live Tunnel for 7fa613f4-0d35-4d1f-b810-439de1bb7ed5

   ┌────────────────────────────────────────────────────────────┐
   │                                                            │
   │                   ◈ Server now ready on                    │
   │   https://vigorous-heisenberg-4662f8-115985.netlify.live   │
   │                                                            │
   └────────────────────────────────────────────────────────────┘

success open and validate gatsby-configs — 0.008 s
success load plugins — 0.344 s
success onPreInit — 1.207 s
success initialize cache — 0.070 s
success copy gatsby files — 0.080 s
success onPreBootstrap — 0.009 s
success source and transform nodes — 0.315 s
success building schema — 0.205 s
success createPages — 0.096 s
success createPagesStatefully — 0.071 s
success onPreExtractQueries — 0.003 s
success update schema — 0.041 s
success extract queries from components — 0.157 s
success run graphql queries — 2.915 s — 36/36 12.36 queries/second
success write out page data — 0.004 s
success write out redirect data — 0.001 s
Generating image thumbnails [==============================] 3/3 2.5 secs 100%
⠄ onPostBootstrapdone generating icons for manifest
success onPostBootstrap — 0.165 s

info bootstrap finished - 10.057 s

 DONE  Compiled successfully in 8153ms                                    11:55:33 AM

 DONE  Compiled successfully in 8153ms                                    11:55:33 AM

 I  Netlify CMS is running at http://localhost:8000/admin/
 DONE  Compiled successfully in 13998ms                                   11:55:39 AM


You can now view thought-at-work-org in the browser.

  http://localhost:8000/

View GraphiQL, an in-browser IDE, to explore your site's data and schema

  http://localhost:8000/___graphql

Note that the development build is not optimized.
To create a production build, use npm run build

boundActionCreators is deprecated. Please use actions instead. For migration instructions, see https://gatsby.dev/boundActionCreators
Check the following files:

gatsby-node.js

ℹ 「wdm」: 
ℹ 「wdm」: Compiled successfully.
> 

oh ya, localhost works but when i go to the .live tunnel server it fails instantly

@dbvisel
Copy link

dbvisel commented Apr 11, 2019

Hey! This works for me now, thanks so much!

One thing maybe for the documentation: I got an error on first run because I don't have an "npm run develop" script but an "npm run dev" script because I am lazy. Maybe other people are lazy like this & it should check for such a script?

But thanks again for something that seems like it could be really useful.

@swyxio
Copy link
Contributor

swyxio commented Apr 11, 2019

thanks @dbvisel yea i definitely need to make the detector logic more flexible. can you let me know what tool you’re using? (like gatsby or nuxt or hugo etc)

@dbvisel
Copy link

dbvisel commented Apr 11, 2019

Gatsby! I can't remember if I modified the name of the script myself or if it comes like that with the default install?

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

Successfully merging a pull request may close this issue.

4 participants