Coder Social home page Coder Social logo

Comments (27)

alexanderwford avatar alexanderwford commented on June 8, 2024 8

Disabling the Console Ninja VS Code Extension fixed this for me.

from next.js.

ArtemGovorov avatar ArtemGovorov commented on June 8, 2024 8

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.

from next.js.

rawic avatar rawic commented on June 8, 2024 3

Hi,
I am also experiencing this issue with the rt.toLowerCase is not a function error when running yarn dev in a project. Here’s the output from running next info in my environment, which might help in identifying any commonalities causing this problem:

Version: Windows 11 Pro Education
  Available memory (MB): 32702
  Available CPU cores: 16
Binaries:
  Node: 20.11.0
  npm: N/A
  Yarn: 1.22.17
  pnpm: N/A
Relevant Packages:
  next: 14.2.1 // Latest available version is detected (14.2.1).
  eslint-config-next: 14.2.1
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.3
Next.js Config:
  output: N/A
Done in 1.84s.

Additionally, I've found that rolling back to Next.js version 14.1.4 resolves this issue.

from next.js.

timneutkens avatar timneutkens commented on June 8, 2024 3

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:

CleanShot 2024-04-16 at 11 26 57@2x

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 πŸ˜“

from next.js.

xspaceboy avatar xspaceboy commented on June 8, 2024 2

Seems like Next.js 14.2 version doesn't support Console Ninja VS Code Extension.
Oh, Maybe Console Ninja VS Code Extension need to update fit to Next.js 14.2 version.

from next.js.

pwglownia avatar pwglownia commented on June 8, 2024 2

You guys are brilliant, it really seems to be connected to Console Ninja extension.

from next.js.

ArtemGovorov avatar ArtemGovorov commented on June 8, 2024 2

@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:

Screenshot 2024-04-17 at 11 09 58β€―AM

(the URL describes the behaviour of patching modules, and how to quickly undo it).

from next.js.

CarrettaRiccardo avatar CarrettaRiccardo commented on June 8, 2024 1

Disabling the Console Ninja VS Code Extension fixed this for me.

After disabling Console Ninja, clean .next and node_modules and reinstall dependencies to work.
It seems like to happen again when installing a new dependency and Console Ninja is enabled.

from next.js.

kobysysouvanh avatar kobysysouvanh commented on June 8, 2024

I am also having this issue on 14.2.1

from next.js.

abdulkareemolumoh avatar abdulkareemolumoh commented on June 8, 2024

I am having same issues. I started exprencing it ever since i updated my nextjs to 14.2.1

from next.js.

jovar-dev avatar jovar-dev commented on June 8, 2024

The same issue. NextJS 14.2.1

from next.js.

Oelshehawi avatar Oelshehawi commented on June 8, 2024

Managed to temp fix it by just going into the bundle5.js file and just replacing rt.toLowerCase() -> rt.toString().toLowerCase()

from next.js.

madrosir avatar madrosir commented on June 8, 2024

The same issue. NextJS 14.2.1

from next.js.

PolGubau avatar PolGubau commented on June 8, 2024

I tried to downgrade to 14.0.4 but still happening

Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote πŸ‘ on the issue description or subscribe to the issue for updates. Thanks!

from next.js.

timneutkens avatar timneutkens commented on June 8, 2024

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 next info to get this information.

from next.js.

husen1003 avatar husen1003 commented on June 8, 2024

I am also getting the same issue:

Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Available memory (MB): 15973
Available CPU cores: 8
Binaries:
Node: 20.11.1
npm: N/A
Yarn: N/A
pnpm: 8.7.5
Relevant Packages:
next: 14.2.1 // Latest available version is detected (14.2.1).
eslint-config-next: 14.2.1
react: 18.2.0
react-dom: 18.2.0
typescript: 5.4.5
Next.js Config:
output: N/A

from next.js.

Hugo-Delattre avatar Hugo-Delattre commented on June 8, 2024

Additionally, I've found that rolling back to Next.js version 14.1.4 resolves this issue.

I had the same issue on latest version, I confirm that rolling back to Next.js 14.1.4 solved it (thanks Rawic!)

from next.js.

alexanderwford avatar alexanderwford commented on June 8, 2024

I'm also having this issue

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 131017
  Available CPU cores: 16
Binaries:
  Node: 21.6.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.1 // Latest available version is detected (14.2.1).
  eslint-config-next: 13.5.6
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A

from next.js.

Poylar avatar Poylar commented on June 8, 2024
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 16307
  Available CPU cores: 16
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: 8.15.5
Relevant Packages:
  next: 14.2.1 // Latest available version is detected (14.2.1).
  eslint-config-next: 14.2.1
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.4
Next.js Config

downgrade to 14.1.2 not fixed the problem, only 14.0.2 fixed

from next.js.

watercubz avatar watercubz commented on June 8, 2024

I have the same error when trying to create an api in version 14.2.1 of nextjs, in the api/hello/hello.ts path it tells me that there was an error with the webpack compiler
imagen_2024-04-15_184715125

from next.js.

user-222002 avatar user-222002 commented on June 8, 2024

im also facing this issue....

from next.js.

PrinzEugen39 avatar PrinzEugen39 commented on June 8, 2024

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

from next.js.

mohammednazim007 avatar mohammednazim007 commented on June 8, 2024

This issue occurred for console Ninja. Update your vs code extension console Ninja & run again

from next.js.

AkipTsaqif avatar AkipTsaqif commented on June 8, 2024

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.

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.

from next.js.

timneutkens avatar timneutkens commented on June 8, 2024

@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

from next.js.

timneutkens avatar timneutkens commented on June 8, 2024

Awesome, thank you!

from next.js.

github-actions avatar github-actions commented on June 8, 2024

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.

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.