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

fix: add consola to wxt dependencies #892

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

hikiko4ern
Copy link
Contributor

wxt imports consola but doesn't specify it in dependencies, so when using pnpm with hoist=false wxt prepare on versions 0.19.0+ throws an error:

node:internal/modules/esm/resolve:854
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'consola' imported from /path/to/project/node_modules/.pnpm/wxt@0.19.2_@types+node@22.0.0_rollup@4.19.1/node_modules/wxt/dist/cli/cli-utils.mjs
    at packageResolve (node:internal/modules/esm/resolve:854:9)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

There is an repro at https://github.com/hikiko4ern/wxt-pnpm-no-hoist, just run pnpm i

Copy link

netlify bot commented Aug 1, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 3fe15a7
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/66ac0fda2f162d00080eb9f9
😎 Deploy Preview https://deploy-preview-892--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, good catch, thanks!

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.74%. Comparing base (52fbd2c) to head (3fe15a7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #892      +/-   ##
==========================================
+ Coverage   82.54%   82.74%   +0.19%     
==========================================
  Files         124      124              
  Lines        6513     6513              
  Branches     1090     1096       +6     
==========================================
+ Hits         5376     5389      +13     
+ Misses       1123     1110      -13     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1 aklinker1 merged commit fc246ff into wxt-dev:main Aug 2, 2024
16 checks passed
@aklinker1
Copy link
Collaborator

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 this pull request may close these issues.

2 participants