I was following this walkthrough: Deploy a Netlify App Built on CockroachDB when I was looking into CockroachDB. I was on my Macbook initially and everything worked great. I later reproduced this on a Windows machine and it appeared as if everything worked but the functions. The command line output from each OS below seems that the server and functions are never fully loaded in Windows.
Good output from Macbook:
test-roach git:(master) ✗ netlify dev
◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Injected .env file env var: DATABASE_URL
◈ Setting up local development server
Cleaned up .netlify/functions-internal.
◈ Starting Netlify Dev with Create React App
> test-roach@0.1.0 start
> react-scripts start
Starting the development server...
Compiled successfully!
You can now view test-roach in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.1.11:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
assets by path static/js/*.js 1.57 MiB
asset static/js/bundle.js 1.57 MiB [emitted] (name: main) 1 related asset
asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.93 KiB [emitted] 1 related asset
asset index.html 1.87 KiB [emitted]
asset asset-manifest.json 458 bytes [emitted]
cached modules 1.44 MiB (javascript) 31.3 KiB (runtime) [cached] 127 modules
webpack 5.70.0 compiled successfully in 337 ms
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
✔ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml
┌─────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:8888 │
│ │
└─────────────────────────────────────────────────┘
No issues found.
◈ Loaded function getPlayers
◈ Loaded function addScore
◈ Loaded function getScores
vs the Windows output:
C:\Users\johnnyT\test-roach> netlify dev
wasm streaming compile failed: TypeError: fetch failed
falling back to ArrayBuffer instantiation
◈ Netlify Dev ◈
◈ Injected build settings env var: DEPRECATED
◈ Ignored general context env var: LANG (defined in process)
◈ Injected .env file env var: DATABASE_URL
◈ Loaded function addScore (http://localhost:8888/.netlify/functions/addScore).
◈ Loaded function getPlayers (http://localhost:8888/.netlify/functions/getPlayers).
◈ Loaded function getScores (http://localhost:8888/.netlify/functions/getScores).
◈ Functions server is listening on 53787
◈ Starting Netlify Dev with Create React App
> test-roach@0.1.0 start
> react-scripts start
Compiled successfully!
You can now view test-roach in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.1.7:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
assets by path static/js/*.js 1.57 MiB
asset static/js/bundle.js 1.57 MiB [emitted] (name: main) 1 related asset
asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.93 KiB [emitted] 1 related asset
asset index.html 1.87 KiB [emitted]
asset asset-manifest.json 458 bytes [emitted]
cached modules 1.44 MiB (javascript) 31.3 KiB (runtime) [cached] 127 modules
webpack 5.70.0 compiled successfully in 926 ms
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.
The Windows output never returns the Waiting for framework port 3000
or the ◈ Server now ready on http://localhost:8888
message and the loading of the functions are output differently. Any suggestions on how to resolve this development issue on Windows?
I’m using Visual Studio Code as my editor and Powershell embedded terminal as well as latest Chrome for testing.
Also worth noting that this works fine in production: https://loquacious-faun-b79216.netlify.app/