Skip to content
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 'dist/build-manifest.json' #4598

Closed
stramel opened this issue Jun 13, 2018 · 9 comments
Closed

Error: Cannot find module 'dist/build-manifest.json' #4598

stramel opened this issue Jun 13, 2018 · 9 comments

Comments

@stramel
Copy link
Contributor

stramel commented Jun 13, 2018

Bug report

Describe the bug

Running dev environment results in Error: Cannot find module 'dist/build-manifest.json'

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. yarn dev

Expected behavior

Application should start up

System information

  • OS: Mac OS
  • Version of Next.js: 6.0.4-canary.4

Additional context

Worked correctly in 6.0.4-canary.3. I assume it has to do with centralizing the distDir and re-organizing for next-server. Error seems to be originating from node_moudles/next/dist/server/render#202 which has buildManifest = require((0, _path.join)(distDir, _constants.BUILD_MANIFEST));. Seems like it isn't properly resolving from the root of the project.

@timneutkens

@timneutkens
Copy link
Member

Could you provide an example? I can't reproduce with the hello-world example.

@timneutkens
Copy link
Member

Happens when using custom-server-express

@stramel
Copy link
Contributor Author

stramel commented Jun 13, 2018

I'm running a custom server, maybe that is the issue? Will try to get a example for you. Sorry

UPDATE: Ah, yeah, that must be the issue.

@timneutkens
Copy link
Member

Fixed! Thanks for the catch, I'll add a test for it soon, interestingly we didn't catch this.

Fixed in 83b5c13

@stramel
Copy link
Contributor Author

stramel commented Jun 13, 2018

Paitently await publish 👍

@timneutkens
Copy link
Member

It's out

@stramel
Copy link
Contributor Author

stramel commented Jun 13, 2018

That fixed this issue. I did get this error but didn't seem to affect anything that I immediately noticed.


Error: "value" required in setHeader("Access-Control-Allow-Headers", value)
    at validateHeader (_http_outgoing.js:489:11)
    at ServerResponse.setHeader (_http_outgoing.js:498:3)
    at addCorsSupport (project/node_modules/next/dist/server/utils.js:63:7)
    at HotReloader._callee$ (project/node_modules/next/dist/server/hot-reloader.js:97:61)
    at tryCatch (project/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (project/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (project/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30)
    at _next (project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9)
    at project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:34:7
    at new Promise (<anonymous>)
    at new F (project/node_modules/core-js/library/modules/_export.js:36:28)
    at HotReloader.<anonymous> (project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:7:12)
    at HotReloader.run (project/node_modules/next/dist/server/hot-reloader.js:192:21)
    at Server._callee14$ (project/node_modules/next/dist/server/index.js:770:41)
    at tryCatch (project/node_modules/regenerator-runtime/runtime.js:62:40)

@timneutkens
Copy link
Member

I couldn't reproduce, but just to be sure: 2a1075c

@stramel
Copy link
Contributor Author

stramel commented Jun 13, 2018

It was blocking navigation after checking around a bit. Thanks for the fix! 6.0.4-canary.6 fixes all issues in this thread 👍

@lock lock bot locked as resolved and limited conversation to collaborators Jun 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants