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

dev not working #49

Closed
RufusK opened this issue May 20, 2022 · 12 comments
Closed

dev not working #49

RufusK opened this issue May 20, 2022 · 12 comments

Comments

@RufusK
Copy link

RufusK commented May 20, 2022

I love the idea of this template. Deployment on netlify and integration with supabase worked like a charm, but I can't get the dev environment to work.

After following all the steps in the readme (creating the project with the "deploy to netlify" button), running "npm run dev" only gives me "Function not found..." in http://localhost:3000/

Logs look like this:
image

I havent changed any files, the only generated file is the .netlify/state.json

If I run npm run build it creates files in public/build and .netlify/functions-internal/server.js.
If I then run npm run dev, it serves the site correctly but after changing files it doesn't reflect those changes but apparently still serves the files generated in npm run build.

@maxcell
Copy link
Contributor

maxcell commented May 20, 2022

Thank you for this report! I think we will need to modify the README to include this manual build step so you get the generated server files.

It still is perplexing to me that after building manually you're seeing files changed but the website isn't reflecting those changes 🤔. That step I cannot reproduce myself, it still automatically reloads and shows the changes. Do they appear for you at all with a manual refresh of the browser at all? Could you also share your node & package manager version?

@kasperstorgaard
Copy link

I can't even get that far, the server "hangs" on netlify dev, and when I kill that process the localhost:3000 message appears.
This is after following the guide of building first.

npm run dev
Screenshot 2022-05-20 at 21 37 45

after killing process
Screenshot 2022-05-20 at 21 37 53

node version: 16.4.2

@RufusK
Copy link
Author

RufusK commented May 20, 2022

node: 16.14.4
npm:8.5.0

Thanks for your quick reply.
Apparently it doesnt run the command specified in netlify.toml:
[dev]
command = "remix watch"
port = 3000
When i run remix watch myself in a separate terminal, everything works fine. (even without running 'npm run build' before)

@maxcell
Copy link
Contributor

maxcell commented May 26, 2022

@RufusK That's also very interesting that it isn't running. What version of the netlify-cli are you using?

@maxcell
Copy link
Contributor

maxcell commented May 26, 2022

This is after following the guide of building first.

Similar @kasperstorgaard what version of the Netlify CLI are you using?

@kasperstorgaard
Copy link

This is after following the guide of building first.

Similar @kasperstorgaard what version of the Netlify CLI are you using?

I actually got it working, not sure what the issue was, could have been my own mistake.

@RufusK
Copy link
Author

RufusK commented May 28, 2022

when i run netlify -v:
netlify-cli/6.7.1 win32-x64 node-v16.14.2

@maxcell
Copy link
Contributor

maxcell commented Jun 1, 2022

@RufusK I notice your version is at 6.7.1 and latest is at 10.4.0 (https://github.com/netlify/cli). Could you try updating and see what the impact is?

@leofmoura
Copy link

I can't make it work too. What am I missing here?

node --version: v18.1.0

Running: npm run dev

image

Getting this issue when creating a user:
image

@maxcell
Copy link
Contributor

maxcell commented Jun 6, 2022

Howdy @leofmoura I think your issue may be separate so I've opened up #50 to further that dialog there.

@maxcell
Copy link
Contributor

maxcell commented Jul 18, 2022

I think we're coming to a head with this problem and gonna try to work on this with #56

@maxcell
Copy link
Contributor

maxcell commented Aug 2, 2022

This should be complete now that #56 is merged. You will be able to use npm run dev and get hot reloading! If you want to examine and test Netlify features such as redirects or functions, you can run ntl dev

@maxcell maxcell closed this as completed Aug 2, 2022
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

4 participants