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

lit-analyzer 2.0.0-pre.1 - Error: Cannot find module './lib/index.cjs' #258

Closed
web-padawan opened this issue May 9, 2022 · 2 comments · Fixed by #262
Closed

lit-analyzer 2.0.0-pre.1 - Error: Cannot find module './lib/index.cjs' #258

web-padawan opened this issue May 9, 2022 · 2 comments · Fixed by #262
Assignees

Comments

@web-padawan
Copy link

When trying to run lit-analyzer@next the following error is thrown:

$ npx lit-analyzer frontend/**/*.ts
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module './lib/index.cjs'
Require stack:
- /Users/serhii/vaadin/docs/node_modules/lit-analyzer/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/serhii/vaadin/docs/node_modules/lit-analyzer/cli.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/serhii/vaadin/docs/node_modules/lit-analyzer/cli.js' ]

As you can see here, the file imported is not published to npm:

Screenshot 2022-05-09 at 18 22 59

@rictic @justinfagnani FYI, possibly related to recent build changes.

@rictic
Copy link
Collaborator

rictic commented May 11, 2022

Yep, that looks like a config error, will take a look.

@rictic rictic self-assigned this May 11, 2022
@rictic rictic moved this to 🔥 Front Burner in Lit Project Board May 11, 2022
rictic added a commit that referenced this issue May 24, 2022
Looks like we updated some paths. Manually confirmed that the CLI works after this change.

Fixes #258
@rictic rictic moved this from 🔥 Front Burner to 🤔 In Review in Lit Project Board May 24, 2022
rictic added a commit that referenced this issue May 24, 2022
* Fix the lit-analyzer CLI

Looks like we updated some paths. Manually confirmed that the CLI works after this change.

Fixes #258

* Update version in constants.ts
Repository owner moved this from 🤔 In Review to ✅ Done in Lit Project Board May 24, 2022
@rictic
Copy link
Collaborator

rictic commented May 24, 2022

Published lit-analyzer@2.0.0-pre.2 which should fix this

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