[TypeScript Plugin] ENOENT: no such file or directory 'node_mnode_modules/...'
See original GitHub issueWhen I set external
in the serverless.yml options to be the name of two node modules (which exist) I get the following error:
ENOENT: no such file or directory, lstat '/Users/darbio/Repositories/tsz/tsz-serverless-api/.build/node_mnode_modules/nodemailer'
Function:
wp-shared-email:
handler: functions/workers/shared/email/handler.index
optimize:
external: [
'nodemailer',
'email-templates'
]
events:
- sns:
topicName: ${self:custom.sns-topic-shared-email}
displayName: SNS topic for sending email
Error:
192-168-1-101:tsz-serverless-api$ serverless deploy function -f wp-shared-email --aws-profile tsz-dev --stage dev
Serverless: Configuring serverless offline -> localstack
Serverless: Configuring serverless offline -> kinesis consumer
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: Optimize: starting engines
Serverless: Optimize: tsz-serverless-api-dev-wp-shared-email
Error --------------------------------------------------
ENOENT: no such file or directory, lstat '/Users/darbio/Repositories/tsz/tsz-serverless-api/.build/node_mnode_modules/nodemailer'
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless
Your Environment Information -----------------------------
OS: darwin
Node Version: 6.9.4
Serverless Version: 1.26.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top Results From Across the Web
npm - How to resolve Node.js: "Error: ENOENT: no such file or ...
Deleting the "node_modules", "build" directories and "package-lock.json" file and then issuing the "npm install" command has fixed the issue for ...
Read more >How to fix: npm ERR! enoent ENOENT: no such file or ...
The error message was npm ERR! enoent ENOENT: no such file or directory, rename 'D:\\WebApp\\node_modules\\lz-string' ...
Read more >How To Fix the “Enoent” Error? - Position Is Everything
The “enoent” can appear because of some missing files or usage of the relative path that can be solved by creating an expected...
Read more >(v1.16.0) Error: ENOENT: no such file or directory, open ...
You can probably resolve this by removing nodebb-plugin-require from your NodeBB package.json file, deleting node_modules , and running npm i ...
Read more >Common Error Details - Snowpack
ENOENT : no such file or directory, open …/node_modules/csstype/index.js ... Node.js recently added support for a package.json “exports” entry that defines ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome @darbio. I will give it a go in the next few days without TS 👍
@darbio are you still using TS plugin with optimize? Want to understand if the issue here is TS compatibility or specific only to those libraries. Thanks for taking the time to explain.