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: ENOENT: no such file or directory, open '/vercel/path0/.next/static/chunks/webpack-middleware-168680c7d73089f6.js' #31659

Closed
saurabhguptarock opened this issue Nov 21, 2021 · 7 comments
Labels
please add a complete reproduction Please add a complete reproduction.

Comments

@saurabhguptarock
Copy link

What version of Next.js are you using?

12.0.5-canary.6

What version of Node.js are you using?

14.18.1

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

Vercel

Describe the Bug

Deploy failed on vercel when concurrentFeatures enabled

Expected Behavior

The serverless function should be deployed successfully

To Reproduce

Enable concurrentFeatures in next.config.js

Add _middleware.tsx file and deploy should be failing.

Screenshot 2021-11-21 at 14 44 35

@saurabhguptarock saurabhguptarock added the bug Issue was opened via the bug report template. label Nov 21, 2021
@KlotzJesse
Copy link

Won't work on 12.04 too, also not on a single canary build.

Any updates on this? Can't use middlewares over all

@KlotzJesse
Copy link

Won't work on 12.04 too, also not on a single canary build.

Any updates on this? Can't use middlewares over all

Did some research and it seems like it is consistent over all version.

I did fork (also tested it with newest React Beta and & NextJs 12.0.5-canary.13) the next-rsc-demo.

As soon as I add a _middleware.js or _middleware.ts to a sub path, vercel won't deploy anymore.

Reproduction: https://github.com/KlotzJesse/next-rsc-demo

May be also referenced to #31803

Middlewares in the main ./pages folder won't even be executed on dev but deployment then works

@balazsorban44 balazsorban44 added kind: bug and removed bug Issue was opened via the bug report template. labels Dec 1, 2021
@jlorezz

This comment has been minimized.

@alessandrojcm
Copy link

alessandrojcm commented Jan 4, 2022

I am also facing this issue, using next@12.0.7 and a single middleware under pages that only checks for authentication. It works locally but does not deploy on Vercel. No concurrent features are enabled btw, just a normal deploy with React 17.

EDIT: tried 12.0.8-canary.16, no luck either.
Nvm my issue was due to an incorrect webpack config, now it's working.

@huozhi
Copy link
Member

huozhi commented Feb 18, 2022

@saurabhguptarock Not sure how your project look like, do you have a reproduction? Could you try the latest 12.1.0 as well?

@KlotzJesse I tried your example with 12.1.0, change concurrentFeatures: true to runtime: 'edge', it works well now.

@balazsorban44 balazsorban44 added please add a complete reproduction Please add a complete reproduction. and removed kind: bug labels Feb 18, 2022
@balazsorban44
Copy link
Member

This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think this was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
please add a complete reproduction Please add a complete reproduction.
Projects
None yet
Development

No branches or pull requests

6 participants