question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Netlify dev stuck in Miro React app (using Vite)

See original GitHub issue

Describe the bug

Trying to run netlify dev command with a Miro React app (which uses vite 3.0.3), it gets stuck at:

` vite preview

➜ Local: http://localhost:4173/ ➜ Network: use --host to expose `

Based on researching this problem, I’ve already tried:

  • using all kinds of different node versions (esp. 16, as suggested by many)
  • using different targetPorts (such as 5173)

None of this helped.

Steps to reproduce

Create a new miro app with npx create-miro-app@latest Link app to Netlify site Run netlify dev

Configuration

No response

Environment

System: OS: macOS 12.5.1 CPU: (8) arm64 Apple M1 Memory: 205.95 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm npmPackages: netlify-cli: ^12.0.11 => 12.0.11

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tinfoil-knightcommented, Oct 24, 2022

@nickytonline

This issue was mainly occurring because framework detection was recognising it as Vite & suggesting npm run serve as the dev command due to the order here:

https://github.com/netlify/framework-info/blob/6e19105dbef40c75f55004376ee8baa56a071674/src/dev.js#L62

Weekly downloads for create-miro-app seem very low so I’m letting this issue stay closed unless you think we should create a fix in https://github.com/netlify/framework-info for this.

1reaction
bennofatiuscommented, Oct 24, 2022

It’s working now, thank you! Oddly enough my “scripts” were defined like that already, but may have been unsaved? So the combination of setting the “scripts” in package.jso as mentioned above, and using "netlify dev --command “npm run start”, solves this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Netlify Dev server doesn't start with Vite #2882 - GitHub
Describe the bug Netlify Dev server never starts when using Vite. To Reproduce Steps to reproduce the behavior: Setup a basic Vite app...
Read more >
Deployment of react app gets stuck because of lingering process
I've started a react app using create-react-app which I've deployed to netlify when I push to Bitbucket which worked great, until it didn't....
Read more >
Trouble setting up netlify dev with vite and npm monorepos
I'm trying to set up an npm monorepo for a large project that is logical to be broken down into its own packages:...
Read more >
React app built with webpack-dev-server stuck on deploy?
What @coelmay is trying to tell you is that, you can't run a server on Netlify. What your command is doing is that,...
Read more >
React vite.js page shows empty page on deploy - Support
I've created a react page using vite and it works and runs locally but when deployed to netlify I encounter this error on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found