-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Webpack loaders not found when building with [email protected]
#46374
Comments
Related: #45455 This is a breaking change that shipped with Next.js 13.2.0. |
Facing Issue for this version : Module parse failed: Unexpected token (6:5) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. |
Having this issue as well. Tried downgrading to 13.1.16 and was able to build with no errors without changing anything else, so it definitely does seem to be a problem with 13.2... |
Also having this problem with ./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/extracted.js.webpack[javascript/auto]!=!./node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[4].oneOf[0].use[1]!./node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[4].oneOf[0].use[2]!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/components/Footer/ThemeSelect/ThemeSelect.css.ts.vanilla.css","source":"Ll8xOW10cGQwIHsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgaGVpZ2h0OiAycmVtOwogIHdpZHRoOiBtaW4tY29udGVudDsKfQouXzE5bXRwZDEgewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBkaXNwbGF5OiBncmlkOwogIHBsYWNlLWl0ZW1zOiBjZW50ZXI7CiAgbGVmdDogdmFyKC0temhsN3hnZCk7CiAgdG9wOiAwOwogIHdpZHRoOiB2YXIoLS16aGw3eGdlKTsKICBoZWlnaHQ6IDEwMCU7CiAgcG9pbnRlci1ldmVudHM6IG5vbmU7Cn0KLl8xOW10cGQyIHsKICBib3JkZXI6IDFweCBzb2xpZDsKICBib3JkZXItY29sb3I6IHZhcigtLWNvbG9yLWJvcmRlcik7CiAgcGFkZGluZy10b3A6IHZhcigtLXpobDd4Z2MpOwogIHBhZGRpbmctYm90dG9tOiB2YXIoLS16aGw3eGdjKTsKICBwYWRkaW5nLXJpZ2h0OiBjYWxjKCh2YXIoLS16aGw3eGdkKSAqIDIpICsgdmFyKC0temhsN3hnZSkpOwogIHBhZGRpbmctbGVmdDogY2FsYygodmFyKC0temhsN3hnZCkgKiAyKSArIHZhcigtLXpobDd4Z2UpKTsKICBoZWlnaHQ6IDJyZW07CiAgZm9udC1zaXplOiB2YXIoLS16aGw3eGczKTsKICBib3JkZXItcmFkaXVzOiB2YXIoLS16aGw3eGdtKTsKICB0ZXh0LWFsaWduOiBsZWZ0Owp9Ci5fMTltdHBkMjpmb2N1cyB7CiAgb3V0bGluZTogdHJhbnNwYXJlbnQ7Cn0KLl8xOW10cGQyOmZvY3VzLXZpc2libGUgewogIG91dGxpbmUtd2lkdGg6IDJweDsKICBvdXRsaW5lLXN0eWxlOiBzb2xpZDsKICBvdXRsaW5lLW9mZnNldDogMnB4OwogIG91dGxpbmUtY29sb3I6IHZhcigtLWNvbG9yLW91dGxpbmUpOwp9Ci5fMTltdHBkMyB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGRpc3BsYXk6IGdyaWQ7CiAgcGxhY2UtaXRlbXM6IGNlbnRlcjsKICByaWdodDogdmFyKC0temhsN3hnZCk7CiAgdG9wOiAwOwogIHdpZHRoOiB2YXIoLS16aGw3eGdlKTsKICBoZWlnaHQ6IDEwMCU7CiAgcG9pbnRlci1ldmVudHM6IG5vbmU7Cn0="}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/extracted.js
TypeError: options.postcss is not a function
at /Users/lukehive/srv/dev/lhowsam.com/node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js:37:55
at Span.traceAsyncFn (/Users/lukehive/srv/dev/lhowsam.com/node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/trace/trace.js:79:26)
at Object.loader (/Users/lukehive/srv/dev/lhowsam.com/node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js:12:16)
Import trace for requested module:
./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/extracted.js.webpack[javascript/auto]!=!./node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[4].oneOf[0].use[1]!./node_modules/.pnpm/next@13.2.1_3duxcpitbtplz62feflag7fwby/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[4].oneOf[0].use[2]!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/components/Footer/ThemeSelect/ThemeSelect.css.ts.vanilla.css","source":"Ll8xOW10cGQwIHsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgaGVpZ2h0OiAycmVtOwogIHdpZHRoOiBtaW4tY29udGVudDsKfQouXzE5bXRwZDEgewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBkaXNwbGF5OiBncmlkOwogIHBsYWNlLWl0ZW1zOiBjZW50ZXI7CiAgbGVmdDogdmFyKC0temhsN3hnZCk7CiAgdG9wOiAwOwogIHdpZHRoOiB2YXIoLS16aGw3eGdlKTsKICBoZWlnaHQ6IDEwMCU7CiAgcG9pbnRlci1ldmVudHM6IG5vbmU7Cn0KLl8xOW10cGQyIHsKICBib3JkZXI6IDFweCBzb2xpZDsKICBib3JkZXItY29sb3I6IHZhcigtLWNvbG9yLWJvcmRlcik7CiAgcGFkZGluZy10b3A6IHZhcigtLXpobDd4Z2MpOwogIHBhZGRpbmctYm90dG9tOiB2YXIoLS16aGw3eGdjKTsKICBwYWRkaW5nLXJpZ2h0OiBjYWxjKCh2YXIoLS16aGw3eGdkKSAqIDIpICsgdmFyKC0temhsN3hnZSkpOwogIHBhZGRpbmctbGVmdDogY2FsYygodmFyKC0temhsN3hnZCkgKiAyKSArIHZhcigtLXpobDd4Z2UpKTsKICBoZWlnaHQ6IDJyZW07CiAgZm9udC1zaXplOiB2YXIoLS16aGw3eGczKTsKICBib3JkZXItcmFkaXVzOiB2YXIoLS16aGw3eGdtKTsKICB0ZXh0LWFsaWduOiBsZWZ0Owp9Ci5fMTltdHBkMjpmb2N1cyB7CiAgb3V0bGluZTogdHJhbnNwYXJlbnQ7Cn0KLl8xOW10cGQyOmZvY3VzLXZpc2libGUgewogIG91dGxpbmUtd2lkdGg6IDJweDsKICBvdXRsaW5lLXN0eWxlOiBzb2xpZDsKICBvdXRsaW5lLW9mZnNldDogMnB4OwogIG91dGxpbmUtY29sb3I6IHZhcigtLWNvbG9yLW91dGxpbmUpOwp9Ci5fMTltdHBkMyB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGRpc3BsYXk6IGdyaWQ7CiAgcGxhY2UtaXRlbXM6IGNlbnRlcjsKICByaWdodDogdmFyKC0temhsN3hnZCk7CiAgdG9wOiAwOwogIHdpZHRoOiB2YXIoLS16aGw3eGdlKTsKICBoZWlnaHQ6IDEwMCU7CiAgcG9pbnRlci1ldmVudHM6IG5vbmU7Cn0="}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/extracted.js
src/components/Footer/ThemeSelect/ThemeSelect.css.ts.vanilla.css!=!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{"fileName":"src/components/Footer/ThemeSelect/ThemeSelect.css.ts.vanilla.css","source":"Ll8xOW10cGQwIHsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgaGVpZ2h0OiAycmVtOwogIHdpZHRoOiBtaW4tY29udGVudDsKfQouXzE5bXRwZDEgewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBkaXNwbGF5OiBncmlkOwogIHBsYWNlLWl0ZW1zOiBjZW50ZXI7CiAgbGVmdDogdmFyKC0temhsN3hnZCk7CiAgdG9wOiAwOwogIHdpZHRoOiB2YXIoLS16aGw3eGdlKTsKICBoZWlnaHQ6IDEwMCU7CiAgcG9pbnRlci1ldmVudHM6IG5vbmU7Cn0KLl8xOW10cGQyIHsKICBib3JkZXI6IDFweCBzb2xpZDsKICBib3JkZXItY29sb3I6IHZhcigtLWNvbG9yLWJvcmRlcik7CiAgcGFkZGluZy10b3A6IHZhcigtLXpobDd4Z2MpOwogIHBhZGRpbmctYm90dG9tOiB2YXIoLS16aGw3eGdjKTsKICBwYWRkaW5nLXJpZ2h0OiBjYWxjKCh2YXIoLS16aGw3eGdkKSAqIDIpICsgdmFyKC0temhsN3hnZSkpOwogIHBhZGRpbmctbGVmdDogY2FsYygodmFyKC0temhsN3hnZCkgKiAyKSArIHZhcigtLXpobDd4Z2UpKTsKICBoZWlnaHQ6IDJyZW07CiAgZm9udC1zaXplOiB2YXIoLS16aGw3eGczKTsKICBib3JkZXItcmFkaXVzOiB2YXIoLS16aGw3eGdtKTsKICB0ZXh0LWFsaWduOiBsZWZ0Owp9Ci5fMTltdHBkMjpmb2N1cyB7CiAgb3V0bGluZTogdHJhbnNwYXJlbnQ7Cn0KLl8xOW10cGQyOmZvY3VzLXZpc2libGUgewogIG91dGxpbmUtd2lkdGg6IDJweDsKICBvdXRsaW5lLXN0eWxlOiBzb2xpZDsKICBvdXRsaW5lLW9mZnNldDogMnB4OwogIG91dGxpbmUtY29sb3I6IHZhcigtLWNvbG9yLW91dGxpbmUpOwp9Ci5fMTltdHBkMyB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGRpc3BsYXk6IGdyaWQ7CiAgcGxhY2UtaXRlbXM6IGNlbnRlcjsKICByaWdodDogdmFyKC0temhsN3hnZCk7CiAgdG9wOiAwOwogIHdpZHRoOiB2YXIoLS16aGw3eGdlKTsKICBoZWlnaHQ6IDEwMCU7CiAgcG9pbnRlci1ldmVudHM6IG5vbmU7Cn0="}!./node_modules/.pnpm/@vanilla-extract+webpack-plugin@2.2.0/node_modules/@vanilla-extract/webpack-plugin/extracted.js
./src/components/Footer/ThemeSelect/ThemeSelect.css.ts
./src/components/Footer/ThemeSelect/ThemeSelect.tsx
./src/components/Footer/Footer.tsx After looking in their
|
Seems NX uses Next.js internals that are not documented and do not fall under any guarantee that they'll exist in the future given that they're not documented and not part of the public api. e.g. importing |
Note: the vanilla-extract issue seems like a different issue and unrelated to the change in the linked PR, we are investigating it. |
Somewhat similar to vanilla-extract-css discussion here: Webpack build error on Next.js 13.2 #1013 |
#46490 should fix the vanilla-extract problem. There's also something to add in vanilla-extract side and I'll comment in vanilla-extract-css/vanilla-extract#1013 |
Is this also the reason that this StackBlitz reproduction causes a server crash when importing Error message:
Seems like Maybe time for configuring the Edit: I've reported separately, over here: |
Should fix the vanilla-extract issue in #46374. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Is this solved? |
Not yet. Having trouble to build next 13.2.x in NX 15.7.2 |
Are there any updates on this? We faced the same issue in the process of upgrading to
|
nx migrate 15.9.0-beta.2 fixes it for me https://github.com/nrwl/nx/releases/tag/15.9.0-beta.2 includes nrwl/nx#15650 which should fix this 🎉 |
Tried the upgrade to 15.9.0-beta.2 but it results in different errors:
And
|
I'm closing this issue since it was fixed in |
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. |
Verify canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Home
Binaries:
Node: 16.19.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 13.2.1
eslint-config-next: 13.1.1
react: 18.2.0
react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/LuckeeDev/csl
To Reproduce
Install
[email protected]
and runyarn build web
. The error will prevent the build from completing, whereas with[email protected]
everything works fine.Describe the Bug
I get multiple statements like the following when building the project:
Expected Behavior
The build should work without errors.
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: