-
Notifications
You must be signed in to change notification settings - Fork 27.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rt.toLowerCase is not a function on fresh next js init #64465
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment has been minimized.
Hey everyone, I've had a look at the reproduction repository but I'm unable to trigger the same error. We tried both macOS, Windows, and Codesandbox but it doesn't trigger. It'd be helpful to get more information than "same issue" for this, to let people know you're running into the same issue you can use the GitHub 👍 feature. Posting "same issue" is not taken into account when sorting issues by how many people are running into them. Is everyone that commented on this issue using Windows? Something else? Which version of Node.js? Tip: you can run |
Hi,
Additionally, I've found that rolling back to Next.js version 14.1.4 resolves this issue. |
I am also getting the same issue: Operating System: |
This comment was marked as spam.
This comment was marked as spam.
I'm also having this issue
|
downgrade to 14.1.2 not fixed the problem, only 14.0.2 fixed |
Disabling the Console Ninja VS Code Extension fixed this for me. |
Seems like Next.js 14.2 version doesn't support Console Ninja VS Code Extension. |
You guys are brilliant, it really seems to be connected to Console Ninja extension. |
im also facing this issue.... |
Hello, so im new developer here with minimum experience. Can you tell me how to recognize problem like this? Like how did we found that console ninja was the source of this problem |
After disabling Console Ninja, clean |
### What? Make sure that more unhelpful comments get minimized by default so issue threads are easier to read. ### Why? #64465 ### How? Using https://github.com/balazsorban44/nissuer#handle-unhelpful-comments NOTE: This has the potential to hide comments that _might_ be useful, but currently it looks like it is too permissive. Closes NEXT-3107
Seems that the Console Ninja extension changes the internals of all frameworks, i.e. it changes Next.js internals to preload code. The code of their extension is heavily mangled and can't be audited -- seems like a security risk. Was able to confirm it adds additional code to Next.js internals and that's why it's breaking: To be clear: this is editing your node_modules when you have the extension is running. That type of changing internals is going to break between any version really, not just for Next.js but for any framework that extension supports. I'd like to avoid having to add integrity checks for core files to Next.js as it's quite slow. Guess we'll have to add a big warning to Next.js when console ninja is detected 😓 |
This comment was marked as spam.
This comment was marked as spam.
Hi, Console Ninja extension team member here. I can confirm the issue was caused by the patch Console Ninja makes in order to support Next.js. Apologies for the inconvenience caused by the broken patch. As soon as the issue has been brought up to our attention, we have fixed it in less than an hour, the extension version 1.0.306 should be working with the latest version of Next.js. @timneutkens The behaviour of patching modules in order to make the extension features work is described in the extension docs. Typically, our patches to other tools are quite small and only include our loader at the start of a tool entry file. Unfortunately, with Next.js that packs its own minified version of webpack, it is slightly harder for us. Regarding the obfuscated code of the extension - while we offer a free version of the tool for everyone, it's a closed source project that also has a commercial Pro edition. And while every closed source software is a potential security risk as it can't be audited, it's worth noting that Wallaby Team (the company behind the extension and a couple more popular dev tools, such as Quokka and Wallaby) has been on the market since early 2015 for ~9.5 years, with over a million of users (both free and paid, including about 100,000 Next.js users in 1.5 years of Console Ninja only) trusting our tools to get more productive. We have also shipped a new version of the patch that should not break Next.js if it fails to apply and will point to Console Ninja in case of any issues. |
Finally thank you! At first I thought this is a Next Js issue since it doesn't mention anything about anything other than the webpack itself. |
@ArtemGovorov thanks for the additional explanation 🙏 I think it would be very helpful if you add a warning / log somewhere to ensure that people are aware that Console Ninja has edited the internals of a framework and might break the framework. I.e. seems a similar issue happened with SvelteKit and they weren't able to figure out the problem for a while as well: sveltejs/kit#10252 |
@timneutkens Great idea, thanks! Apart from making sure our patches should not break target tools, we went ahead and added/released the following message to all CLI tools we integrate with: ![]() (the URL describes the behaviour of patching modules, and how to quickly undo it). |
Awesome, thank you! |
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. |
Link to the code that reproduces this issue
https://github.com/AkipTsaqif/next-js-init-error
To Reproduce
npx create-next-app@latest
and follow the steps as usualnpm run dev
rt.toLowerCase is not a function at \node_modules\next\dist\compiled\webpack\bundle5.js:30:274042
Current vs. Expected behavior
next js should not produces those error
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
based on this SO question, that just been asked recently, this happens on next js 14.2
The text was updated successfully, but these errors were encountered: