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

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'minimist' #17

Closed
gdorsi opened this issue May 4, 2022 · 6 comments
Closed

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'minimist' #17

gdorsi opened this issue May 4, 2022 · 6 comments

Comments

@gdorsi
Copy link

gdorsi commented May 4, 2022

Hello!

I'm getting this error when running npx unlighthouse --site https://www.example.com

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'minimist' imported from /Users/home/.npm/_npx/944abecbf21dfffb/node_modules/@unlighthouse/core/dist/process/lighthouse.mjs
  at new NodeError (node:internal/errors:371:5)
  at packageResolve (node:internal/modules/esm/resolve:884:9)
  at moduleResolve (node:internal/modules/esm/resolve:929:18)
  at defaultResolve (node:internal/modules/esm/resolve:1044:11)
  at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
  at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
  }
  at makeError (/Users/home/.npm/_npx/944abecbf21dfffb/node_modules/execa/lib/error.js:59:11)
  at handlePromise (/Users/home/.npm/_npx/944abecbf21dfffb/node_modules/execa/index.js:119:26)
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at async runLighthouseTask (/Users/home/.npm/_npx/944abecbf21dfffb/node_modules/@unlighthouse/core/dist/index.mjs:4858:19)

✔ Unlighthouse has finished scanning https://www.example.com/: 1 routes in 4s.    

Looking at the deps here seems to be an undeclared dependency.

@harlan-zw
Copy link
Owner

Hey @gdorsi

Thanks for taking the time to make the issue. Quite a weird bug as through all my testing I never got an error about this and other people seem to be running it fine.

Either way I've pushed up version 0.3.27 which has this dependency, would you be able to try it out and let me know if the issue is resolved?

npx unlighthouse@0.3.27 --site <site>

@harlan-zw harlan-zw reopened this May 6, 2022
@gdorsi
Copy link
Author

gdorsi commented May 9, 2022

Now I'm getting this error instead:

node:internal/errors:465
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/home/.npm/_npx/c0ab863ec4723902/node_modules/@unrouted/core/dist/index.mjs' imported from /Users/home/.npm/_npx/c0ab863ec4723902/node_modules/@unlighthouse/core/dist/index.mjs
    at new NodeError (node:internal/errors:372:5)
    at finalizeResolution (node:internal/modules/esm/resolve:437:11)
    at moduleResolve (node:internal/modules/esm/resolve:1009:10)
    at defaultResolve (node:internal/modules/esm/resolve:1218:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
    at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

I've tested this with both volta and fnm on two different PC's (one Linux and one MacOS)

The command executed is npx unlighthouse@0.3.27 --site https://www.example.com

@harlan-zw harlan-zw reopened this May 9, 2022
@harlan-zw
Copy link
Owner

Hey @gdorsi

Sorry, you're still having issues. I was able to replicate this via StackBlitz, looking into a solution

@harlan-zw harlan-zw reopened this May 9, 2022
@gdorsi
Copy link
Author

gdorsi commented May 9, 2022

I was able to replicate this via StackBlitz

Ah nice to know, next time I'll try to create a repro with it.

@harlan-zw harlan-zw reopened this May 9, 2022
@harlan-zw
Copy link
Owner

Alright @gdorsi, as far as I can tell it's fixed in the latest version. Would you be able to test?

npx unlighthouse@0.3.28 --site https://www.example.com

And thanks again for your help with this issue

@gdorsi
Copy link
Author

gdorsi commented May 9, 2022

Perfect, it works now!

Thanks!

@gdorsi gdorsi closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants