ui icon indicating copy to clipboard operation
ui copied to clipboard

Error on every website after "npx shadcn-ui@latest init"

Open marcusgeorgievski opened this issue 2 years ago • 2 comments

After executing npx shadcn-ui@latest init in my Next.js project at the root level, I get warning on every single site I visit on chrome.

I can confirm this started exactly after executing that script, I did nothing else. I deleted that project and still get the errors. New Next.js projects I start also get these errors (from seemingly nowhere) which results in small bugs like favicons not loading. Every single website gets these console errors as well. I would assume some dependencies were installed that are causing this.

A have tried clearing cache, cookies, etc, and restarting everything over the last 2 days. The only option seems to be to reset my macbook for the sake of future development.

This now happens when starting a new next.js project, there were never vulnerabilities before:

❯ npm audit
# npm audit report

semver  <7.5.2
Severity: moderate
semver vulnerable to Regular Expression Denial of Service - https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/eslint-plugin-import/node_modules/semver
node_modules/eslint-plugin-jsx-a11y/node_modules/semver
node_modules/eslint-plugin-react/node_modules/semver
  eslint-plugin-import  >=2.27.4
  Depends on vulnerable versions of semver
  node_modules/eslint-plugin-import
  eslint-plugin-jsx-a11y  >=6.6.0
  Depends on vulnerable versions of semver
  node_modules/eslint-plugin-jsx-a11y
  eslint-plugin-react  7.19.0 || >=7.26.0
  Depends on vulnerable versions of semver
  node_modules/eslint-plugin-react
    eslint-config-next  >=12.0.5-canary.0
    Depends on vulnerable versions of eslint-plugin-react
    node_modules/eslint-config-next

5 moderate severity vulnerabilities

This error appears in the console for EVERY webpage

Uncaught Error: Cannot find module 'jquery'
    at s (VM212 translations.js:1:155)
    at s (frames.js:1:134)
    at frames.js:1:325
    at require.frames.../application/backbone-extend (frames.js:13:18785)
    at s (frames.js:1:274)
    at e (frames.js:1:441)
    at frames.js:1:458
s @ VM212 translations.js:1
s @ frames.js:1
(anonymous) @ frames.js:1
require.frames.../application/backbone-extend @ frames.js:13
s @ frames.js:1
e @ frames.js:1
(anonymous) @ frames.js:1
VM212 translations.js:1 Uncaught Error: Cannot find module 'prototype-extender'
    at s (VM212 translations.js:1:155)
    at s (content-script.js:1:114)
    at content-script.js:1:305
    at 122.../package.json (content-script.js:8:12472)
    at s (content-script.js:1:254)
    at e (content-script.js:1:421)
    at content-script.js:1:438 

The following may help:

This is ONLY in the console of localhost:3000 where nextjs projects startup, whether the server is active or not

crbug/1173575, non-JS module files deprecated.                                   VM45:5 
(anonymous) @ VM45:5

This occasionally outputs in the console

Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.

This is my global npm dependencies, incase it could help

/opt/homebrew/lib
└── [email protected]

marcusgeorgievski avatar Jun 26 '23 19:06 marcusgeorgievski

This error appears in the console for EVERY webpage

Uncaught Error: Cannot find module 'jquery'
    at s (VM212 translations.js:1:155)
    at s (frames.js:1:134)
    at frames.js:1:325
    at require.frames.../application/backbone-extend (frames.js:13:18785)
    at s (frames.js:1:274)
    at e (frames.js:1:441)
    at frames.js:1:458
s @ VM212 translations.js:1
s @ frames.js:1
(anonymous) @ frames.js:1
require.frames.../application/backbone-extend @ frames.js:13
s @ frames.js:1
e @ frames.js:1
(anonymous) @ frames.js:1
VM212 translations.js:1 Uncaught Error: Cannot find module 'prototype-extender'
    at s (VM212 translations.js:1:155)
    at s (content-script.js:1:114)
    at content-script.js:1:305
    at 122.../package.json (content-script.js:8:12472)
    at s (content-script.js:1:254)
    at e (content-script.js:1:421)
    at content-script.js:1:438 
crbug/1173575, non-JS module files deprecated.                                   VM45:5 
(anonymous) @ VM45:5

This occasionally outputs in the console

Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.

Those are certainly not related to the init script you ran.

dan5py avatar Jun 26 '23 20:06 dan5py

The vulnerabilities you see come from different dependencies use in the project, so they are not directly related to the cli.

Mostly of the warnings you see on every page you visit are probably related to some extensions you have installed. Try visiting the same website in incognito mode and check if the warnings still appear.

dan5py avatar Jun 26 '23 20:06 dan5py