-
Notifications
You must be signed in to change notification settings - Fork 179
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
Error: Cannot find module 'preview-email' #1179
Comments
Run a |
Ye, somehow running "npm install module preview-email" solved the problem, but now i have it installed in the package.json, hope will not cause some problems ! |
Ran into the same issue, from what I can see, the compiled output of the npm package that got released is identical to the previous version. EDIT: |
Preview email is now an optional dependency. |
PR #1173 related to improvements and fixes. |
Looking at npm without having any way to test it right now, the compiled code on npm in version 2.0.2 looks at least correct. |
I will try with the 2.0.2 version if that error is gone ! Thanks for help guys |
Is this fixing one error that leads to another error? |
Seems there's isn't an easy way to ignore optional dependencies. IMO, all of them (template engines, Basically |
Describe the bug
After i run the first 2 commands from @nestjs-modules/mailer to install it and i run npm run start:dev, i get this big error :
"Error: Cannot find module 'preview-email'
Require stack:
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1142:15)
at Function.Module._load (node:internal/modules/cjs/loader:983:27)
at Module.require (node:internal/modules/cjs/loader:1230:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/home/cristi/Documents/work/employee-record/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:8:22)
at Module._compile (node:internal/modules/cjs/loader:1368:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
at Module.load (node:internal/modules/cjs/loader:1205:32)
at Function.Module._load (node:internal/modules/cjs/loader:1021:12)
at Module.require (node:internal/modules/cjs/loader:1230:19)"
I checked for other error but after installation i don t see any in the terminal.
Another think i figure out is about "preview-email" is missing from package-lock.json, i tryed to delete the node-module and install all, but still got the same error.
And the versions of what is installed on the project are up to date: ""dependencies": {
"@apollo/server": "^4.10.4",
"@casl/ability": "^6.7.1",
"@nestjs-modules/mailer": "^2.0.0",
"@nestjs/apollo": "^12.1.0",
"@nestjs/common": "^10.3.8",
"@nestjs/config": "^3.2.2",
"@nestjs/core": "^10.3.8",
"@nestjs/graphql": "^12.1.1",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.3.8",
"@nestjs/swagger": "^7.3.1",
"@nestjs/throttler": "^5.1.2",
"@nestjs/typeorm": "^10.0.2",
"bcrypt": "^5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"dotenv": "^16.4.5",
"graphql": "^16.8.1",
"graphql-scalars": "^1.23.0",
"graphql-type-json": "^0.3.2",
"lodash": "^4.17.21",
"mysql2": "^3.9.7",
"nodemailer": "^6.9.13",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"pg": "^8.11.5",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"typeorm": "^0.3.20"
},"
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: