next.js: Some examples don't work
What example does this report relate to?
See list below
What version of Next.js are you using?
latest
What version of Node.js are you using?
14.x
What browser are you using?
Chrome
What operating system are you using?
MacOS
How are you deploying your application?
/
Describe the Bug
While testing all examples for this PR, I ran into a few examples that didn’t work. Here’s a list:
- with-webpack-bundle-size-analyzer
- see #26715
- with-webassembly (fixed in #26440)
- see #26436
- with-i18n-next-intl (fixed in #25928)
MISSING_OTHER_CLAUSE
- with-ant-design-mobile (fixed in #25929)
- missing peer dependencies with
yarnor our internal package managerturbo
- missing peer dependencies with
- with-kea (fixed in #26069)
- missing peer dependencies with
yarnor our internal package managerturbo→@babel/core
- missing peer dependencies with
- with-lingui (fixed in #26076)
- missing peer dependencies with
yarnor our internal package managerturbo→@babel/core - deprecation warnings
- missing peer dependencies with
- with-mobx (fixed in #26069)
- missing peer dependencies with
yarnor our internal package managerturbo→@babel/core
- missing peer dependencies with
- with-mobx-react-lite (fixed in #26069)
- missing peer dependencies with
yarnor our internal package managerturbo→@babel/core
- missing peer dependencies with
- with-mobx-state-tree (fixed in #26069)
- missing peer dependencies with
yarnor our internal package managerturbo→@babel/core
- missing peer dependencies with
- with-mobx-state-tree-typescript (fixed in #25589)
- missing peer dependencies with
yarnor our internal package managerturbo→@babel/core
- missing peer dependencies with
- with-next-page-transitions (fixed in #25901)
- Warning: viewport meta tags should not be used in _document.js’s
<Head>. https://nextjs.org/docs/messages/no-document-viewport-meta
- Warning: viewport meta tags should not be used in _document.js’s
- with-next-sitemap (fixed in #25866)
- missing
devDependencies→typescript
- missing
- ssr-caching
- with-rbx-bulma-pro (fixed in #25854)
- with-react-md (fixed in #26001)
- uses
node-sasswhich doesn’t work on StackBlitz because it requires a binary and typically involves running aninstallscript which builds the package. Would be nice if we could switch tosassinstead, thetypescriptversion of this example also uses sass.
- uses
- with-react-multi-carousel (fixed in #25902)
Warning: Each child in a list should have a unique "key" prop
- with-reflux
Warning: componentWillMount has been renamed
- with-tailwindcss-emotion
matchUtilitiesis not a function- Cannot find module
with-tailwindcss-emotion/.next/server/pages-manifest.json
- with-typescript-graphql (fixed in #26010)
- with-urql (fixed in #25987)
- CORS errors for
https://graphql-pokemon.vercel.app/, maybe we can add stackblitz.com to the allowed origins
- CORS errors for
Expected Behavior
The examples are expected to work locally.
After an example has been fixed, please add a Preview section to the README.md right above Deploy your own.
- Replace
DIRECTORY_NAMEwith the directory name you’re adding.
## Preview
Preview the example live on [StackBlitz](http://stackblitz.com/):
[](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/DIRECTORY_NAME)
⚠️ If the example doesn’t work on StackBlitz, please let us know and file an issue here.
To Reproduce
Follow the steps in the README.md.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 29 (28 by maintainers)
Commits related to this issue
- fix: added typescript dependency in next-sitemap example (#25866) As mentioned in #25854 `witn-next-sitemap` example is missing `typescript` package as a dependency - [x] Make sure the linting passe... — committed to vercel/next.js by vitalybaev 3 years ago
- fix: move viewport meta tag to head in _app.js (#25901) Fixes one of the items that was mentioned in #25854. It fixes the warning in `with-next-page-transitions` by moving the viewport tag to `_app... — committed to vercel/next.js by deleted user 3 years ago
- fix: use key while rendering arrays (#25902) Fixes one of the items that was mentioned in #25854. It fixes warning from React in `with-react-multi-carousel`. — committed to vercel/next.js by deleted user 3 years ago
- (examples/with-urql): fixes graphql server url (#25987) ## Documentation / Examples - [x] Make sure the linting passes As mentioned in #25854 `with-urql` doesn't work. After investigation, I've fou... — committed to vercel/next.js by vitalybaev 3 years ago
- (examples/with-urql): fixes graphql server url (#25987) ## Documentation / Examples - [x] Make sure the linting passes As mentioned in #25854 `with-urql` doesn't work. After investigation, I've fou... — committed to janicklas-ralph/next.js by vitalybaev 3 years ago
- (examples/with-react-md): switch from node-sass to sass (#26001) ## Documentation / Examples - [x] Make sure the linting passes Continuing fixing #25854 Switching from `node-sass` to `sass` — committed to vercel/next.js by vitalybaev 3 years ago
- (example/with-typescript-grapql): fix deps (#26010) ### Documentation / Examples Fixed one of the items from #25854 - [x] add `@graphql-codegen/import-types-preset` - [x] remove depriceated field `... — committed to vercel/next.js by deleted user 3 years ago
- (examples): fix missed peer dependencies (#26069) Fixes some examples from #25854 - with-kea [live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/missed-peer-deps/examples/with-k... — committed to vercel/next.js by deleted user 3 years ago
- (examples/with-rbx-bulma-pro): update deps (#26077) Fixes one of the items from #25854 ## Documentation / Examples - [x] Make sure the linting passes - [x] Add the StackBlitz button — committed to vercel/next.js by deleted user 3 years ago
- fix: added typescript dependency in next-sitemap example (#25866) As mentioned in #25854 `witn-next-sitemap` example is missing `typescript` package as a dependency - [x] Make sure the linting passe... — committed to blitz-js/next.js by vitalybaev 3 years ago
- fix: move viewport meta tag to head in _app.js (#25901) Fixes one of the items that was mentioned in #25854. It fixes the warning in `with-next-page-transitions` by moving the viewport tag to `_app... — committed to blitz-js/next.js by deleted user 3 years ago
- fix: use key while rendering arrays (#25902) Fixes one of the items that was mentioned in #25854. It fixes warning from React in `with-react-multi-carousel`. — committed to blitz-js/next.js by deleted user 3 years ago
- (examples/with-urql): fixes graphql server url (#25987) ## Documentation / Examples - [x] Make sure the linting passes As mentioned in #25854 `with-urql` doesn't work. After investigation, I've fou... — committed to blitz-js/next.js by vitalybaev 3 years ago
- (examples/with-react-md): switch from node-sass to sass (#26001) ## Documentation / Examples - [x] Make sure the linting passes Continuing fixing #25854 Switching from `node-sass` to `sass` — committed to blitz-js/next.js by vitalybaev 3 years ago
- (example/with-typescript-grapql): fix deps (#26010) ### Documentation / Examples Fixed one of the items from #25854 - [x] add `@graphql-codegen/import-types-preset` - [x] remove depriceated field `... — committed to blitz-js/next.js by deleted user 3 years ago
- (examples): fix missed peer dependencies (#26069) Fixes some examples from #25854 - with-kea [live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/missed-peer-deps/examples/with-k... — committed to blitz-js/next.js by deleted user 3 years ago
- (examples/with-rbx-bulma-pro): update deps (#26077) Fixes one of the items from #25854 ## Documentation / Examples - [x] Make sure the linting passes - [x] Add the StackBlitz button — committed to blitz-js/next.js by deleted user 3 years ago
- (examples/with-lingui): update example (#26076) Fixes one of the items from #25854 ## Documentation / Examples - [x] Make sure the linting passes - [x] Add the StackBlitz button - [x] [Live demo](h... — committed to vercel/next.js by deleted user 3 years ago
- (examples/with-webassembly) fixed for webpack 5 (#26440) ## Documentation / Examples - [x] Make sure the linting passes Fixes #26436 As mention in #25854 `with-webassembly` example doesn't work an... — committed to vercel/next.js by vitalybaev 3 years ago
- (examples/with-lingui): update example (#26076) Fixes one of the items from #25854 ## Documentation / Examples - [x] Make sure the linting passes - [x] Add the StackBlitz button - [x] [Live demo](h... — committed to blitz-js/next.js by deleted user 3 years ago
I’m going to fix all of the examples with missed peer dependencies
with-react-mdhas been merged 👌Example
with-typescript-graphqlis currenty not working. The fix above didn’t work.In
lib/resolvers.tstypescript throws an error and fails to compile.Ideas how to fix it?
Yay! Has been merged 🙌 Thanks @vitalybaev
Yes. It installs the latest version of
@lingui/reactand some exports were deprecated (removed actually). I think I can update the example.Thanks @akellbl4 for fixing the
with-typescript-grapqlexmaple 🎉 🙏@d3lm
with-urqlexample has been fixed in #25987. I’ve also added StackBlitz button in readme. Please check it.@d3lm good! Let me know if anything causes errors I’m ready to fix it 😉
Could you please convert this list to checkboxes? It would be much better to understand fixed cases 🙏
@d3lm thanks for reporting! It has been broken after releasing Next.js 11, that enabled webpack 5 by default. Let’s wait my PR to merge 😴
@akellbl4 @vitalybaev I just filed an issue for
with-webassemblywhich broke recently. Maybe you have some time to check?Ops, that’s was my bad. Fixed in https://github.com/vercel/next.js/pull/26091
ssr-caching example does not work, even with current latest package versions. I made it working like this, but there is an issue when using next-i18next. locale is not available from next router, but locales is.
server.js
@akellbl4 I commented on your PRs with updates and can verify that the i18n example works now 👍 Good job!
@akellbl4 Thanks for the update! Let me test those examples again and update the checklist accordingly.
with-next-page-transitionshas been fixed.with-react-multi-carouselis fixed as wellwith-refluxexample. The warning produced byreflux. Reflux hasn’t got updates last 4 years.Good work, thanks!
mobx-state-tree-typescriptshould be fixed in #25589