You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error triggered using mailer and any template adapter combined with a custom webpack.config.js, reporting that dist/css_inline_bg.wasm not found.
#1095
Open
wxk6b1203 opened this issue
Jan 19, 2024
· 1 comment
Describe the bug
When I use a custom webpack.config.js to build the nestjs bundle and start with node dist/main.js, the app reports an error and exit immediately:
Error: ENOENT: no such file or directory, open 'C:\Users\xxx\Documents\Project\xxx-worker\dist\css_inline_bg.wasm'
at Object.openSync (node:fs:581:18)
at Object.readFileSync (node:fs:457:35)
at Object.__decorate (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:473906:54)
at __webpack_require__ (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:550543:42)
at Object.<anonymous> (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:472238:22)
at __webpack_require__ (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:550543:42)
at Object.<anonymous> (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:59790:23)
at __webpack_require__ (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:550543:42)
at Object.defineProperty.value (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:10:22)
at __webpack_require__ (C:\Users\xxx\Documents\Project\xxx-worker\dist\main.js:550543:42) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\xxx\\Documents\\Project\\xxx-worker\\dist\\css_inline_bg.wasm'
}
This will happen if I use anyone of the template, e.g.:
If I run node dist/main.js, the error is triggered.
Expected behavior
None of the errors should be printed.
Desktop (please complete the following information):
OS: Windows 11 x64
Node: v20.10.0
NPM: 10.20.3
Additional context
If I remove the template, everything goes fine.
The text was updated successfully, but these errors were encountered:
wxk6b1203
changed the title
Error triggered using mailer and any template adapter combined with a custom webpack.config.js, reported that dist/css_inline_bg.wasm not found.
Error triggered using mailer and any template adapter combined with a custom webpack.config.js, reporting that dist/css_inline_bg.wasm not found.
Jan 19, 2024
Describe the bug
When I use a custom
webpack.config.js
to build thenestjs
bundle and start withnode dist/main.js
, the app reports an error and exit immediately:This will happen if I use anyone of the template, e.g.:
then create a
webpack.config.js
:and then modify
package.json
:"scripts": { + "build": "nest build --webpack --webpackPath=./webpack.config.js", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "test": "jest", "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/jest/bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json" },
and then
If I run
node dist/main.js
, the error is triggered.Expected behavior
None of the errors should be printed.
Desktop (please complete the following information):
Additional context
If I remove the template, everything goes fine.
The text was updated successfully, but these errors were encountered: