Skip to content
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

lodash.js dependency problem. #21

Open
Akisazaki opened this issue Feb 9, 2025 · 1 comment
Open

lodash.js dependency problem. #21

Akisazaki opened this issue Feb 9, 2025 · 1 comment
Labels

Comments

@Akisazaki
Copy link

I tried to run the following command:

$ pnpm --package github:violentmonkey/generator-userscript --package yo dlx yo @violentmonkey/userscript

Then I got this error.

Error: Cannot find package 'C:\Users\{user-name}\AppData\Local\pnpm-cache\dlx\iizhfo75uaff6m2vbuhqul27je\194ea035b1a-47d8\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected]_@[email protected]_@yeoman+_dp3hve3ckn2cygyuwgj4dspmqy\node_modules\lodash-es\package.json' imported from C:\Users\{user-name}\AppData\Local\pnpm-cache\dlx\iizhfo75uaff6m2vbuhqul27je\194ea035b1a-47d8\node_modules\.pnpm\[email protected]_@[email protected]_@[email protected]_@[email protected]_@yeoman+_dp3hve3ckn2cygyuwgj4dspmqy\node_modules\yeoman-environment\dist\environment-full.js
Did you mean to import [email protected]/node_modules/lodash-es/lodash.js?
    at legacyMainResolve (node:internal/modules/esm/resolve:214:26)
    at packageResolve (node:internal/modules/esm/resolve:840:14)
    at moduleResolve (node:internal/modules/esm/resolve:910:20)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

My system info

  • OS : Windows 11 Pro 23H2(22631.4751)
  • CPU : AMD Ryzen 5 5600X
  • RAM : 32GB
  • node.js: v20.11.1
  • package manager: pnpm 9.9.0 (installed via corepack)

How can I solve it?

@gera2ld
Copy link
Member

gera2ld commented Feb 10, 2025

It seems to be a pnpm and Windows issue. It happened even before loading this template.
I found a similar issue here.
Could you try using node@22, or a newer pnpm or npm instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants