webcrate icon indicating copy to clipboard operation
webcrate copied to clipboard

new-space fails locally with Node 20.4.0, NPM 9.8.0

Open peter-kehl opened this issue 1 year ago • 1 comments

Summary: Can't run new-space branch (63cf695923678acb356e90314137edb5761b78e9) locally (with Node 20.4.0, NPM 9.8.0). (But, it seems to run well on Deta.Space.)

🐞 Describe the bug

Hi Maximilian or friend,

Thank you for Deta & WebCrate. Looking forward to using them & contributing.

Environment: Current Manjaro (stable Arch, x64) Linux (current stable kernel 6.3.5-2), Node 20.4.0, NPM 9.8.0 (installed via nvm). (All the below is running not as root/via sudo, but as an ordinary user.)

FIRST: (but potentially unrelated): Instead of space dev I've tried npm run build. That complained about needing rimraf. So I've installed it with npm install rimraf. FYI: That reports: 78 vulnerabilities (51 moderate, 25 high, 2 critical).

SECOND:

space --version
space version 0.3.13
space dev

Checking for running micros...

 Starting 1 micro servers...

Micro app (primary)
L url: http://localhost:4200/

[app] 
[app] > [email protected] start
[app] > NODE_ENV=production node build/index.js
[app] 
[app] 
[app] node:internal/modules/cjs/loader:1051
[app]   throw err;
[app]   ^
[app] 
[app] Error: Cannot find module '/share/pkehl/GIT/webcrate/build/index.js'
[app]     at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
[app]     at Module._load (node:internal/modules/cjs/loader:901:27)
[app]     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
[app]     at node:internal/main/run_main_module:23:47 {
[app]   code: 'MODULE_NOT_FOUND',
[app]   requireStack: []
[app] }
[app] 
[app] Node.js v20.4.0
[app] 
Command `/home/pkehl/.nvm/versions/node/v20.4.0/bin/npm run start` exited.
Error: Get "http://localhost:4201/__space/actions": dial tcp [::1]:4201: connect: connection refused

THIRD: on Deta.Space:

space new
...
space push
...
Checking for running micros...

 Starting 1 micro servers...

Micro app (primary)
L url: http://localhost:4200/

[app] 
[app] > [email protected] start
[app] > NODE_ENV=production node build/index.js
[app] 
[app] 
[app] node:internal/modules/cjs/loader:1051
[app]   throw err;
[app]   ^
[app] 
[app] Error: Cannot find module '/share/pkehl/GIT/webcrate/build/index.js'
[app]     at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
[app]     at Module._load (node:internal/modules/cjs/loader:901:27)
[app]     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
[app]     at node:internal/main/run_main_module:23:47 {
[app]   code: 'MODULE_NOT_FOUND',
[app]   requireStack: []
[app] }
[app] 
[app] Node.js v20.4.0
[app] 
Command `/home/pkehl/.nvm/versions/node/v20.4.0/bin/npm run start` exited.
Error: Get "http://localhost:4201/__space/actions": dial tcp [::1]:4201: connect: connection refused
...

# BUT, SURPRISINGLY:
2023/07/06 15:16:21 All micros built successfully
...
2023/07/06 15:16:44 starting installation...
...
2023/07/06 15:17:24 completed...
                                                                  
✓ Successfully pushed your code and updated your Builder instance!
# That seems to run well (so far).

Please, shed some light. Node/NPM is outside of my expertise, but wherever I can, I'll contribute, I'll update docs...

Thank you in advance for any tips on developing locally.

peter-kehl avatar Jul 07 '23 21:07 peter-kehl