Cannot start the server
illright opened this issue · 7 comments
I'm following the running instructions very closely. The only deviations are:
- I used a custom directory instead of
/js
, making sure to substitute it in all the commands - I use the Node provided by
pnpm
(thepnpm env
command that installs and links a desired version of Node andnpm
)
Upon running ./edit en
I get the following error:
Error log
[17:21:41] Using gulpfile ~/work/javascript-info/server/gulpfile.js
[17:21:41] Starting 'edit'...
[17:21:41] Starting 'webpack'...
[17:21:41] Starting 'engine:koa:tutorial:importWatch'...
[17:21:41] Starting 'livereload'...
[17:21:41] Starting 'server'...
(node:10406) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Livereload server listening
[17:21:42] 'engine:koa:tutorial:importWatch' errored after 1.74 s
[17:21:42] Error: Cannot find module '@trysound/sax'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/illright/work/javascript-info/server/modules/engine/koa/tutorial/lib/figuresImporter.js:12:13)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/illright/work/javascript-info/server/modules/engine/koa/tutorial/tasks/importWatch.js:4:23)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at /home/illright/work/javascript-info/server/modules/engine/gulp/requireModuleTasks.js:10:16
at taskWrapper (/home/illright/work/javascript-info/server/node_modules/undertaker/lib/set-task.js:13:15)
[17:21:42] 'edit' errored after 1.75 s
I wanted to see what would happen if I ran npm install @trysound/sax --save
, then this error appeared:
Error log
[17:12:58] Using gulpfile ~/work/javascript-info/js/server/gulpfile.js
[17:12:58] Starting 'edit'...
[17:12:58] Starting 'webpack'...
[17:12:58] Starting 'engine:koa:tutorial:importWatch'...
[17:12:58] Starting 'livereload'...
[17:12:58] Starting 'server'...
(node:9293) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9293) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:9293) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Livereload server listening
[17:12:59] 'engine:koa:tutorial:importWatch' errored after 1.49 s
[17:12:59] Error: Cannot find module 'client/init/light2dark'
Require stack:
- /home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/lib/figuresImporter.js
- /home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/tasks/importWatch.js
- /home/illright/work/javascript-info/js/server/modules/engine/gulp/requireModuleTasks.js
- /home/illright/work/javascript-info/js/server/gulpfile.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp-cli/lib/shared/require-or-import.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp-cli/index.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp/bin/gulp.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/lib/figuresImporter.js:13:20)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/tasks/importWatch.js:4:23)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at /home/illright/work/javascript-info/js/server/modules/engine/gulp/requireModuleTasks.js:10:16
at taskWrapper (/home/illright/work/javascript-info/js/server/node_modules/undertaker/lib/set-task.js:13:15)
at bound (node:domain:421:15)
at runBound (node:domain:432:12)
[17:12:59] 'edit' errored after 1.5 s
On an unrelated note: have there been any efforts to modernize the tech stack of this website? The build process feels a bit cumbersome, and I wonder if we could remedy that with modern build tools and frameworks
Try now? (git pull all repos)
Now this other error comes up about 'client/init/light2dark'
(the one under the second spoiler)
Did you git pull modules/engine?
Ah, I totally didn't. Thanks, now it seems to be working. I still wonder about that question though, about the tech stack modernization, but other than that, feel free to close this.
What's with the tech stack?
I just feel like modern bundlers like Vite, paired with a UI framework (React, Vue, Svelte) could create a more maintainable codebase and deliver a better experience across the website. Gulp is pretty outdated, in my opinion.
This would also make bringing up the server locally easier, with fewer commands and no need for globally installing anything
Not enough advantage to rewrite =)