Skip to content

new-space fails locally with Node 20.4.0, NPM 9.8.0 #84

@peter-lyons-kehl

Description

@peter-lyons-kehl

Summary: Can't run new-space branch (63cf695) 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions