I tried to install shadcn/ui with npx create-next-app@latest [my app name]

but I get this error everytime I try.

`node:internal/modules/esm/resolve:215
const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified);
^

Error: Cannot find package ‘C:UsersUserAppDataLocalnpm-cache_npx125ee17d583c4e03node_moduleshttps-proxy-agentpackage.json’ imported from C:UsersUserAppDataLocalnpm-cache_npx125ee17d583c4e03node_modulesshadcn-uidistindex.js
at legacyMainResolve (node:internal/modules/esm/resolve:215:26)
at packageResolve (node:internal/modules/esm/resolve:841:14)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleWrap. (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36) {
code: ‘ERR_MODULE_NOT_FOUND’
}

Node.js v20.12.1`

I tried Node 18.20.1, but it still didn’t work.

And these are things I also tried:

  • npm install https-proxy-agent
  • npm cache clean -f
  • Delete node_modules folder and redo npm install

New contributor

Y I is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.