-
Notifications
You must be signed in to change notification settings - Fork 26.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
My next/image just flat out refuses to display #33604
Comments
Hi @samuelhulla I found you're using In the future versions we'll support custom // _app.server.tsx
export default function App({ children } : { children: React.Node }) {
return children
} I'd recommend you to use custom _app without |
Hey @huozhi. You are correct regarding |
Seems there's still a issue when having |
I did and now I get the following error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /Users/samuel/Coding/portfolio/node_modules/react/package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
at packageExportsResolve (node:internal/modules/esm/resolve:703:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.mod._resolveFilename (/Users/samuel/Coding/portfolio/node_modules/next/dist/build/webpack/require-hook.js:179:28)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at getPackagePath (/Users/samuel/Coding/portfolio/node_modules/next/dist/build/webpack-config.js:548:41)
at Object.getBaseWebpackConfig [as default] (/Users/samuel/Coding/portfolio/node_modules/next/dist/build/webpack-config.js:564:9) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What's even weirder, after I re-added it back I can no longer start the app. After further investigation what's even weirder, i tried changing my node version via
yarn run v1.22.17
warning ../package.json: No license field
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
warn - You have enabled experimental feature(s).
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.
warn - You are using the experimental Edge Runtime with `concurrentFeatures`.
warn - You have experimental React Server Components enabled. Continue at your own risk.
(node:94315) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/samuel/Coding/portfolio/node_modules/react/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
warn - No utilities were generated there is likely a problem with the `content` key in the tailwind config. For more information see the documentation: https://tailwindcss.com/docs/content-configuration
wait - compiling...
event - compiled client and server successfully in 1198 ms (127 modules)
wait - compiling...
event - compiled successfully in 29 ms (99 modules)
wait - compiling /_error (client and server)...
wait - compiling...
event - compiled client and server successfully in 50 ms (128 modules)
warn - using beta Middleware (not covered by semver) - https://nextjs.org/docs/messages/beta-middleware
wait - compiling / (client and server)...
wait - compiling...
event - compiled client and server successfully in 431 ms (251 modules)
wait - compiling...
event - compiled successfully in 174 ms (106 modules)
wait - compiling / (client and server)...
wait - compiling...
event - compiled client and server successfully in 83 ms (247 modules)
wait - compiling...
event - compiled successfully in 151 ms (101 modules)
wait - compiling...
event - compiled client and server successfully in 112 ms (222 modules) This however did fix the issue, but either way, something seems very wrong with this repo setup. |
@samuelhulla That's a known issue on react side, likely will be fixed in next rc version. I'm using the node 14 it works for me so far. Could you try to downgrade the node version? |
@huozhi Yeah, node@14 does work on |
It's up to you, I think once react make it compatible for new node versions you're able to switch versions freely |
Alright, thanks a lot for the help. Unless there's something else you'd like to add you can consider this issue closed. |
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. |
Hi we fixed the issue with strict mode on canary now, you can have |
Run
next info
(available from version 12.0.8 and up)What version of Next.js are you using?
12.0.8
What version of Node.js are you using?
17.4.0
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
next start
Describe the Bug
Hey, I'm using the upcoming Next.js 12 in combination with the release candidate for React 18.
There is however a weird issue, where my images just flat out refuse to display, even though they seemed to be served correctly and
next/image
is according to the documentation already supported in Next.js 12 in Combination with React 18The issue is farily simple - I've tried importing images via
next/image
compoent, yet they fail to display.In my
index.server.tsx
:Yet, the images just flat out refuse to show:
I've tried the following:
dev
)Test.client.tsx
component, to enforce it's not an issue with SSR stream / Server component.None of these however worked
Expected Behavior
I'd expect the images would display.
To Reproduce
You can view the repository I tested this on here:
https://github.com/samuelhulla/portfolio/tree/feat/parallax (branch
feat/parallax
)Thank you in advance. As of note, I previously did have issue with my next images not showing and then they just simply started working nowhere out of nowhere, so I'm unsure if I'm doing anything wrong, this is some bug, or just a caching issue.
The text was updated successfully, but these errors were encountered: