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

Cannot find module #61

Open
jdylanmc opened this issue May 13, 2021 · 2 comments · May be fixed by #74
Open

Cannot find module #61

jdylanmc opened this issue May 13, 2021 · 2 comments · May be fixed by #74

Comments

@jdylanmc
Copy link

Hi,

I am trying the following on a windows 10 machine:

npm install -g lighthouse-batch
cd C:\lighthouse
lighthouse-batch -f sites.txt --html

where sites.txt has a number of websites in it, separated by newline.

This results in the following error reported over and over:

PS C:\lighthouse> lighthouse-batch -f sites.txt --html
internal/modules/cjs/loader.js:775
    throw err;
    ^

Error: Cannot find module 'C:\Users\Dylan'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at Function.Module._load (internal/modules/cjs/loader.js:677:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
1/0: Lighthouse analysis FAILED for https://www.mysite.com/
internal/modules/cjs/loader.js:775
    throw err;
    ^

Is there a dependency missing or am I doing something wrong? I tried following the instructions on the readme.md but I am hitting this error in windows and a similar error in Mac OSX.

@jdylanmc
Copy link
Author

For what it's worth, I am able to get this module to work by running npm init, installing the module locally to a directory, and using the script block in my package.json. I think perhaps the readme just needs to be updated as it's a bit unclear.

@mikestead
Copy link
Owner

Hey @jdylanmc sorry to hear you've hit some issues. I don't have access to a windows machine, but did try on mac (you mentioned it being broken there too) without any issues.

If you could give me the mac specific error, even if similar, that may give me a little more to go on. It does look like some type of dependency pathing issue you're right.

@calumy calumy linked a pull request Dec 2, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants