-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm run start fails #194
Comments
I have a similar problem. In my case, the It feels that I'm doing something wrong. I'm compiling my code with
Line 5 and 6 are requireing modules without -- yarn tsc --project tsconfig.json && yarn tsc-alias -p tsconfig.json There is an open issue on the swc repo regarding this bug swc-project/swc#2725 |
npm run start is failing with the following error message..
Successfully compiled: 27 files, copied 4 files with swc (53.37ms)
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './app.ts'
Require stack:
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. (/home/ramanacv/work/getwise/momo/momo-be/dist/server.js:5:37)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND', -->
Tried again and this time a different place but similar error as below -
Successfully compiled: 22 files, copied 2 files with swc (188.82ms)
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './middlewares/error.middleware.ts'
Require stack:
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. (/home/ramanacv/work/getwise/momo/nft-api-backend/dist/app.js:22:49)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153: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) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/ramanacv/work/getwise/momo/nft-api-backend/dist/app.js',
'/home/ramanacv/work/getwise/momo/nft-api-backend/dist/server.js'
]
version is the latest one from master branch. Happens for default installation as well as any other options..
Works fine in dev mode - npm run dev...
The text was updated successfully, but these errors were encountered: