question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

target: 'serverless' on local build

See original GitHub issue

I just spend one hour investigating why next build does not work locally then I realized I have target set ‘serverless’ in next.config.js.

Maybe it should be ignored for the local build.

Error: Cannot find module '/Users/steida/dev/este/.next/server/static/jAvZuFRlVjcCJxcCa5aNH/pages/_document'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
dav-iscommented, Jan 27, 2019

@marcinczenko this issue should be solved in 8.0.0-canary.17

https://github.com/zeit/next.js/issues/6154

2reactions
marcinczenkocommented, Jan 27, 2019

Yes!!! It works. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless Offline - Serverless Framework: Plugins
Serverless Offline. This Serverless plugin emulates AWS λ and API Gateway on your local machine to speed up your development cycles.
Read more >
Target - AWS Serverless Application Model
Configures the AWS resource that EventBridge invokes when a rule is triggered. Syntax. To declare this entity in your AWS Serverless Application Model...
Read more >
serverless-esbuild - Victor Korzunin - GitHub Pages
A Serverless framework plugin to bundle JavaScript and TypeScript with extremely fast esbuild.
Read more >
Multi-env Next.js app with AWS Amplify & Serverless
amplify.yml build: commands: # Move into the target Serverless env ... any output files generated to the local .serverless folder and store ...
Read more >
Serverless CLI Integration - Jovo
npm install @jovotech/target-serverless. If you haven't installed the ... Create serverless.yaml file based on plugin configuration $ jovo build:serverless.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found