wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.63k stars 1.18k forks source link

TodoApp tutorial: error after 'Listing tasks' step. Cannot find module .wasp/out/server/src/core/auth.js #159

Closed edoloughlin closed 3 years ago

edoloughlin commented 3 years ago

Please note the TodoApp still runs even though the error below is present.

Describe the bug Using wasp v0.1.9 Follow the TodoApp setup steps to the 'Listing tasks' step. I added the getTasks query to main.wasp and created ext/queries.js. Saved both files (save all to avoid intermediate 'file missing' errors). Console shows:

Recompiling on file change...
Recompilation on file change succeeded.
Web app: Compiled successfully!
Server: [nodemon] restarting due to changes...
Server: [nodemon] starting `node ./src/server.js`
Server (stderr): (node:589921) ExperimentalWarning: The ESM module loader is experimental.
Server (stderr): internal/modules/run_main.js:54
Server (stderr):     internalBinding('errors').triggerUncaughtException(
Server (stderr):                               ^
Server (stderr):
Server (stderr): Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/datadisk/ed/dev/TodoApp/.wasp/out/server/src/core/auth.js' imported from /datadisk/ed/dev/TodoApp/.wasp/out/server/src/dbClient.js
Server (stderr):     at finalizeResolution (internal/modules/esm/resolve.js:284:11)
Server (stderr):     at moduleResolve (internal/modules/esm/resolve.js:665:10)
Server (stderr):     at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:755:11)
Server (stderr):     at Loader.resolve (internal/modules/esm/loader.js:97:40)
Server (stderr):     at Loader.getModuleJob (internal/modules/esm/loader.js:243:28)
Server (stderr):     at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:46:40)
Server (stderr):     at link (internal/modules/esm/module_job.js:45:36) {
Server (stderr):   code: 'ERR_MODULE_NOT_FOUND'
Server (stderr): }
Server: [nodemon] app crashed - waiting for file changes before starting...

To Reproduce Install wasp-lang 0.1.9, follow TodoApp tutorial steps.

Expected behavior No errors.

Screenshots

image

Desktop (please complete the following information):

Smartphone (please complete the following information): n/a

Additional context Add any other context about the problem here. NodeJS v12.18.2

Martinsos commented 3 years ago

Hi @edoloughlin , thanks a lot for reporting this, it was a bug from our side! I just fixed it and deployed new version of Wasp, 0.1.9.1, download/install it and this should be problem no more.

You mentioned you are doing save all to avoid intermediate 'file missing' errors -> what exactly do you mean by that? Those were the errors you would get from Wasp I guess?

edoloughlin commented 3 years ago

I just saved main.wasp and queries.js using 'Save All' in my editor so the changes would be detected once.

Martinsos commented 3 years ago

@edoloughlin got it! Any specific reason to do that? To avoid error messages from Wasp?