question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module '@lhci/server/src/api/storage/storage-method.js'

See original GitHub issue

When running lhci healthcheck on the latest CLI version ("@lhci/cli": "0.3.10"), I get this error:

Cannot find module '@lhci/server/src/api/storage/storage-method.js'
Require stack:
- /PATH/REDACTED/node_modules/@lhci/cli/src/wizard/wizard.js
- /PATH/REDACTED/node_modules/@lhci/cli/src/cli.js

Things work fine in "@lhci/cli": "0.3.9"

I believe the issue is that #239 introduces a runtime dependency for @lhci/cli on the @lhci/server package, with no corresponding actual package.json dependency. This line specifically.

Workarounds that I can confirm are 👍 for me:

  • Explicitly add "@lhci/server": "0.3.10" as a dependency.
  • Downgrade to "@lhci/cli": "0.3.9"

I’m not sure whether the right fix is to explicitly add the server dependency, or to reconfigure things so it’s not necessary, but wanted to at least file the workarounds for others who might hit this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

2reactions
Ethan-Arrowoodcommented, Mar 19, 2020

Can confirm 0.3.11 fixed my ci! thank you 😃

1reaction
trptcolincommented, Mar 19, 2020

Wow that was quick. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >
Fix a CloudWatch canary that's failing with the error "Cannot ...
The error message reads: Cannot find module ... under the nodejs/node_modules file path (such as nodejs/node_modules/myCanaryFilename.js).
Read more >
Error: Cannot find module in JavaScript [SOLVED]
We can solve Error: Cannot find module by installing the missing module. We can use npm tool to install the mising module.
Read more >
I have an error it says: Error: Cannot find module '.env'
[nodemon] starting node ./index.js node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module '.env' Require stack: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found