Closed tyler71 closed 11 months ago
not specifying the js file defaults to index.js, and this does work It appears that specifying the path causes the issue
Eg
$ jscad-now
[0000] info Server running at http://192.168.10.71:8099/ (connect)
[0000] info LiveReload running
press ENTER to close server and clean up "jscad-now.js" project file
[0002] 2246ms 4.6MB (browserify)
$ scad-now index.js
[0000] info Server running at http://192.168.10.71:8099/ (connect)
[0000] info LiveReload running
press ENTER to close server and clean up "jscad-now.js" project file
Error: Can't walk dependency graph: Cannot find module 'index.js' from '/ram/jscad-now/test/jscad-now.js'
required by /ram/jscad-now/test/jscad-now.js
at /home/z/.config/yarn/global/node_modules/resolve/lib/async.js:146:35
at processDirs (/home/z/.config/yarn/global/node_modules/resolve/lib/async.js:299:39)
at isdir (/home/z/.config/yarn/global/node_modules/resolve/lib/async.js:306:32)
at /home/z/.config/yarn/global/node_modules/resolve/lib/async.js:34:69
at FSReqCallback.oncomplete (node:fs:199:21) {
code: 'MODULE_NOT_FOUND',
stream: [Labeled]
}
$ mv index.js index.js2
$ jscad-now test -> main — ! ? RC=1
Error: ENOENT: no such file or directory, stat '/ram/jscad-now/test/index.js'
at Object.statSync (node:fs:1710:3)
at Object.<anonymous> (/home/z/.config/yarn/global/node_modules/jscad-now/src/server/index.js:11:6)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Function.Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (/home/z/.config/yarn/global/node_modules/jscad-now/bin/cli.js:2:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14) {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/ram/jscad-now/test/index.js'
}
input file "./index.js" does not exist
Using Ubuntu 22.04. Trialed installing locally, globally, with npm & yarn.
Reproducible error: