github / codespaces-react

MIT License
364 stars 668 forks source link

npm run dev not working in Codespaces #50

Closed AnadyaNair closed 2 months ago

AnadyaNair commented 1 year ago

Does codespace host files locally? When attempting to use npm run dev in a Codespaces environment, the command fails to execute as expected. This behaviour is inconsistent with typical npm behaviour and appears to be specific to the Codespaces environment. The codespace gives an output message in the terminal that the project is hosted at localhost, but there seems to be an issue with that.

Steps to Reproduce:

  1. Open a Codespaces environment with a Node.js project.
  2. In the terminal, run the command npm run dev.

Expected Behavior: The npm run dev command should execute and start the development server as specified in the project's package.json file.

Actual Behavior:

[0] 
[0] > nextjs-todo-list@2.0.0 dev:css
[0] > tailwindcss -w -i ./styles/tailwind.css -o styles/app.css
[0] 
[1] ready - started server on 0.0.0.0:3000, url: http://localhost:3000
[0] Browserslist: caniuse-lite is outdated. Please run:
[0]   npx update-browserslist-db@latest
[0]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[0] 
[0] Rebuilding...
[0] 
[0] Done in 458ms.
[1] Browserslist: caniuse-lite is outdated. Please run:
[1]   npx browserslist@latest --update-db
[1]   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[1] event - compiled client and server successfully in 3s (228 modules)
joshaber commented 2 months ago

npm start will start the dev server 👍