Cannot find module '@lhci/server/src/api/storage/storage-method.js'
See original GitHub issueWhen 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:
- Created 4 years ago
- Reactions:3
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can confirm 0.3.11 fixed my ci! thank you 😃
Wow that was quick. Thanks!