-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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 'next/dist/compiled/jest-worker' - On Docker #48173
Comments
the same issue |
the same |
┌─[zhuxian@zhuxiandeMacBook-Pro] - [~/Documents/projects/learn/next-app] - [Mon Apr 10, 10:03]
warn - Latest canary version not detected, detected: "13.3.0", newest: "13.3.1-canary.3". |
Try to downgrade |
I've tried 0.31.3 and 0.30.7. Both is not work for me |
I am having the same problem, it looks like the bug was introduce in v13.2.5-canary.27. I think the problem was introduced with this #47788 Previous version, |
We've updated |
use next@13.2.4 and the issue will be fixed. |
Downgrade |
Was this reported as a bug? |
same issue 13.3.1-canary.4 |
same issue with #48077 and there is a workaround. |
* [EVT-003] BUG: vercel/next.js#48173 * {EVT-003] Update lock file
next |
Had the same issue with loading images on an app hosted with Amplify and downgrading next to |
For reference see: vercel/next.js#48173
I can confirm that downgrading to |
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation or adding/fixing Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change --> ### What? This PR fixes the issue where using `output: "standalone"` breaks `next/image`, `opengraph-image.tsx`,... (those that use `image-optimizer`), which was introduced by #47208 as it added `next/dist/compiled/jest-worker` to `ignores`. ### How? Dynamically import `squoosh` so that it does not throw. Fixes #48077 Fixes #48173
Got same error on nextjs 13.3.0, node:18-alpine Error: Cannot find module 'next/dist/compiled/jest-worker' |
Works for me now with: 13.3.5-canary. |
I've just found that my package.json doesn't have |
I ran into the exact same problem when I tried adding Docker after creating my app with My way to make things work was downgrading to version |
the same issue |
I confirm the same problem with this version as well. |
The problem persists in newer versions @ijjk. Could you reopen the ticket to track it? 13.4.0 works, 13.4.3 doesn't. Somewhere in that diff you can find the regression. |
It appears |
I am also seeing this issue no longer occur on 13.4.8 in a test deployment this morning. |
Same here. Just updated recently to 13.4.8 and that error apparently was fixed 😊 |
I'm stuck. I'm working with r-suite package. This error occurs only on the imported r-suite page. Error: Cannot find module '../../next@13.4.8_@babel+core@7.22.8_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/constants.js'
code: 'MODULE_NOT_FOUND',
✅ Solved |
There appears to be an even tighter window to find the regressions now because
|
That's it so. Avoid odd version, guys 🤡
…On Mon, 10 Jul 2023, 22:19 Clark Brown, ***@***.***> wrote:
The problem persists in newer versions @ijjk <https://github.com/ijjk>.
Could you reopen the ticket to track it? 13.4.0 works, 13.4.3 doesn't.
Somewhere in that diff you can find the regression.
There appears to be an even tighter window to find the regressions now
because ***@***.*** has the same error. As mentioned above ***@***.***
works just fine, but the newest patch version ***@***.*** yields the old
error.
Error: Cannot find module 'next/dist/compiled/jest-worker'
Require stack:
- /app/node_modules/next/dist/server/lib/render-server-standalone.js
- /app/server.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/app/node_modules/next/dist/server/lib/render-server-standalone.js:12:21)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/app/node_modules/next/dist/server/lib/render-server-standalone.js',
'/app/server.js'
]
}
—
Reply to this email directly, view it on GitHub
<#48173 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLJAO4DXEFESF4KHI5FTYDXPRWVXANCNFSM6AAAAAAWYLG7BE>
.
You are receiving this because you commented.Message ID: <vercel/next.
***@***.***>
|
It solved after install jest-worker manually
|
I actually have the error using both I am currently trying to dockerize my app using the following const path = require('path');
module.exports = {
reactStrictMode: true,
output: 'standalone',
transpilePackages: [
'ui',
],
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
// https://nextjs.org/docs/advanced-features/output-file-tracing#caveats
experimental: {
// this includes files from the monorepo base two directories up
outputFileTracingRoot: path.join(__dirname, '../../'),
},
}; I have tried commenting the I am using EDIT : Typo in |
I tried this too, didn't work for me. My config is available in the comment above, tried w/ |
@Clovel out of curiosity: I'm pretty sure it says something if you don't have
There is an error at startup for me, even with
|
@ianldgs nope, no warning about
Am I missing something ? |
No idea... my bet was (Edit)
|
I'm using |
This helped me as well. But your command is not correct Its
I am on "next": "^13.4.12" |
This helped me. I accounted an error when i used |
worked for me. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue
https://github.com/Storxy/storxy-business-erp
To Reproduce
Trying to dockerize next application using with docker and the docker file can be found on the repo but it throws an errors when ever I run the containers and visit any page that contain an optimized image while sharp is already been installed and the image not shown
Describe the Bug
images not working in docker apps
Expected Behavior
to show optimized image?
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: