A Hint when has build: "xxx" is imported by "xxx?commonjs-external", but could not be resolved – treating it as an external dependency #16409
Unanswered
yangdaxian-is-cool
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
this project built in pnpm+monorepo, when i want to build this project. as follow:
When I finish building the vue project, I get a reminder:“"lodash/debounce" is imported by "lodash/debounce?commonjs-external", but could not be resolved – treating it as an external dependency.”.
I checked to see if the lodash library was being used in the project and found that it wasn't.
Reproduction
https://github.com/yangdaxian-is-cool/build-test.git
Steps to reproduce
pnpm i
pnpm run build
System Info
Used Package Manager
pnpm
Logs
vite v5.2.8 building for production...
"lodash/debounce" is imported by "lodash/debounce?commonjs-external", but could not be resolved – treating it as an external dependency.
"lodash/set" is imported by "lodash/set?commonjs-external", but could not be resolved – treating it as an external dependency.
"lodash/toPath" is imported by "lodash/toPath?commonjs-external", but could not be resolved – treating it as an external dependency.
"lodash/get" is imported by "lodash/get?commonjs-external", but could not be resolved – treating it as an external dependency.
✓ 102 modules transformed.
No name was provided for external module "lodash/debounce" in "output.globals" – guessing "require$$0$1".
No name was provided for external module "lodash/get" in "output.globals" – guessing "require$$2".
No name was provided for external module "lodash/set" in "output.globals" – guessing "require$$3".
No name was provided for external module "lodash/toPath" in "output.globals" – guessing "require$$4".
dist/vue-cytoscape-core.umd.cjs 1,661.07 kB │ gzip: 293.88 kB │ map: 2,736.00 kB
dist/vue-cytoscape-core.js 1,574.07 kB │ gzip: 291.34 kB │ map: 2,732.22 kB
✓ built in 3.10s
vite v5.2.8 building for production...
"lodash/debounce" is imported by "lodash/debounce?commonjs-external", but could not be resolved – treating it as an external dependency.
"lodash/set" is imported by "lodash/set?commonjs-external", but could not be resolved – treating it as an external dependency.
"lodash/toPath" is imported by "lodash/toPath?commonjs-external", but could not be resolved – treating it as an external dependency.
"lodash/get" is imported by "lodash/get?commonjs-external", but could not be resolved – treating it as an external dependency.
✓ 102 modules transformed.
No name was provided for external module "lodash/debounce" in "output.globals" – guessing "require$$0$1".
No name was provided for external module "lodash/get" in "output.globals" – guessing "require$$2".
No name was provided for external module "lodash/set" in "output.globals" – guessing "require$$3".
No name was provided for external module "lodash/toPath" in "output.globals" – guessing "require$$4".
dist/vue-cytoscape-core.iife.js 1,660.46 kB │ gzip: 293.73 kB
✓ built in 2.41s
Validations
Beta Was this translation helpful? Give feedback.
All reactions