[now] nestjs error: cannot find module `@nodelib/fs.stat`
See original GitHub issueI’m trying to deploy nestjs server. Few days ago it worked fine, but now i get this error:
SyntaxError: Unexpected token (16:10)
09:39:17 PM | at Object.re.raise (evalmachine.<anonymous>:1:266416)
09:39:17 PM | at Object.z.unexpected (evalmachine.<anonymous>:1:222693)
09:39:17 PM | at Object.ee.parseIdent (evalmachine.<anonymous>:1:265599)
09:39:17 PM | at Object.parseIdent (evalmachine.<anonymous>:1:461728)
09:39:17 PM | at Object.parseIdent (evalmachine.<anonymous>:1:186548)
09:39:17 PM | at Object.ee.parsePropertyName (evalmachine.<anonymous>:1:261995)
09:39:17 PM | at Object.parsePropertyName (evalmachine.<anonymous>:1:4333)
09:39:17 PM | at Object.H.parseClassElement (evalmachine.<anonymous>:1:236905)
09:39:17 PM | at Object.parseClassElement (evalmachine.<anonymous>:1:459918)
09:39:17 PM | at Object.parseClassElement (evalmachine.<anonymous>:1:183081)
09:39:17 PM | Module build failed (from /tmp/ef2c4852ec461ae6/.build-utils/.builder/node_modules/@zeit/ncc/dist/ncc/loaders/relocate-loader.js):
09:39:17 PM | SyntaxError: Unexpected token (15:10)
09:39:17 PM | at Object.re.raise (evalmachine.<anonymous>:1:266416)
09:39:17 PM | at Object.z.unexpected (evalmachine.<anonymous>:1:222693)
09:39:17 PM | at Object.ee.parseIdent (evalmachine.<anonymous>:1:265599)
09:39:17 PM | at Object.parseIdent (evalmachine.<anonymous>:1:461728)
09:39:17 PM | at Object.parseIdent (evalmachine.<anonymous>:1:186548)
09:39:17 PM | at Object.ee.parsePropertyName (evalmachine.<anonymous>:1:261995)
09:39:17 PM | at Object.parsePropertyName (evalmachine.<anonymous>:1:4333)
09:39:17 PM | at Object.H.parseClassElement (evalmachine.<anonymous>:1:236905)
09:39:17 PM | at Object.parseClassElement (evalmachine.<anonymous>:1:459918)
09:39:17 PM | at Object.parseClassElement (evalmachine.<anonymous>:1:183081)
09:39:17 PM | at compiler.close.n (evalmachine.<anonymous>:3:1350338)
09:39:17 PM | at _promise0.then._result0 (eval at create (evalmachine.<anonymous>:1:349386), <anonymous>:13:1)
09:39:17 PM | at <anonymous>
now.json:
{
"name": "super-cool-project-name",
"builds": [
{ "src": "index.js", "use": "@now/node-server" }
],
"routes": [
{
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, Content-Type, Accept"
},
"src": "/.*",
"dest": "/index.js"
}
]
}
index.js:
require('ts-node')
require('tsconfig-paths/register');
require('./src/main');
any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:19 (5 by maintainers)
Top Results From Across the Web
0 - Stack Overflow
I encountered a error when using NestJS. The console shows 0 error first and then crahsed with the Error: Cannot find module './'...
Read more >Cannot find module 'fs' Error in TypeScript | bobbyhadz
To solve the "Cannot find module fs or its corresponding type declarations" error, install the types for node by running the command npm...
Read more >What does it take to support Node.js ESM? – The Guild
I have worked on all The Guild's libraries and graphql-js to support ESM. Here is how you can do it too.
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >CCL1043-K21: Error when scaffolding the component
Command: snc ui-component project --name now-experience-dashboard --description "My First NXF ... Error: Cannot find module 'keytar'.
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
This dependency is used in
@nestjs/graphql
@styfle When will it be fixed?