Hi, I have a question in main field in package.json.
main field in package.json
// ...
"main": "dist/index.js",
// ...
ls -al result on installed package
drwxr-xr-x imjuni staff 256 B Mon Feb 21 16:20:25 2022 constant/
drwxr-xr-x imjuni staff 192 B Mon Feb 21 16:20:24 2022 decorator/
drwxr-xr-x imjuni staff 256 B Mon Feb 21 16:20:25 2022 domain/
drwxr-xr-x imjuni staff 192 B Mon Feb 21 16:20:25 2022 enum/
drwxr-xr-x imjuni staff 192 B Mon Feb 21 16:20:25 2022 exception/
drwxr-xr-x imjuni staff 192 B Mon Feb 21 16:20:25 2022 explorer/
.rw-r--r-- imjuni staff 224 B Sat Oct 26 17:15:00 1985 index.d.ts
.rw-r--r-- imjuni staff 957 B Sat Oct 26 17:15:00 1985 index.js
drwxr-xr-x imjuni staff 320 B Mon Feb 21 16:20:25 2022 interface/
.rw-r--r-- imjuni staff 1.0 KB Sat Oct 26 17:15:00 1985 LICENSE
.rw-r--r-- imjuni staff 1.8 KB Tue Mar 8 12:59:45 2022 package.json
.rw-r--r-- imjuni staff 1.9 KB Sat Oct 26 17:15:00 1985 queue.module.d.ts
.rw-r--r-- imjuni staff 10 KB Sat Oct 26 17:15:00 1985 queue.module.js
.rw-r--r-- imjuni staff 27 KB Sat Oct 26 17:15:00 1985 README.md
drwxr-xr-x imjuni staff 224 B Mon Feb 21 16:20:24 2022 service/
.rw-r--r-- imjuni staff 110 KB Sat Oct 26 17:15:00 1985 tsconfig.prod.tsbuildinfo
drwxr-xr-x imjuni staff 320 B Mon Feb 21 16:20:25 2022 util/
installed package don't have a dist directory.
pm2 execution environment error raised by main field
(node:16111) [DEP0128] DeprecationWarning: Invalid 'main' field in '/Users/imjuni//nestjs-scaffolding/artifact/node_modules/@team-supercharge/nest-amqp/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
I change 'dist/index.js' to 'index.js' after execute without error.
Hi, I have a question in main field in package.json.
main field in package.json
ls -al result on installed package
installed package don't have a dist directory.
I change 'dist/index.js' to 'index.js' after execute without error.
How can I fix this?