Closed phcent closed 2 years ago
Can you provide a reusable example?
+1
Does it still exist? Try new nuxt3@latest and element-plus@latest.
I'm still seeing something similar in a Vue 3 project with latest
:
package.json
"element-plus": "^1.2.0-beta.6",
error message
Error: Cannot find module '/Users/USERNAME/Dev/REPONAME/node_modules/.pnpm/element-plus@1.2.0-beta.6_vue@3.2.21/node_modules/lodash/isEqual' imported from /Users/USERNAME/Dev/REPONAME/node_modules/.pnpm/element-plus@1.2.0-beta.6_vue@3.2.21/node_modules/element-plus/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs
Did you mean to import lodash@4.17.21/node_modules/lodash/isEqual.js?
For reference:
lodash-es
not lodash
in my project, which I believe it correct for an ESM buildvitest
If this is not the same issue I'm happy to post it to element-plus-vite-starter
(edit: I've posted my latest progress on another issue -- element-plus/4923)
same here on "element-plus": "^1.3.0-beta.10" and nuxt3
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/edouard/Développement/git/portillon-nuxtjs/node_modules/lodash/isEqual' imported from /home/edouard/Développement/git/portillon-nuxtjs/node_modules/element-plus/es/components/time-picker/src/common/picker.mjs
using this patch from commit b6c47adca53af3846742a2c5218bde82743381fb :
file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/node_modules/element-plus/es/components/popper/src/popper.mjs:1
import { placements } from '@popperjs/core';
^^^^^^^^^^
SyntaxError: Named export 'placements' not found. The requested module '@popperjs/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@popperjs/core';
const { placements } = pkg;
at ModuleJob._instantiate (internal/modules/esm/module_job.js:124:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:179:5)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async __instantiateModule__ (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:5151:3)
[vite dev] Error loading external "/home/edouard/Développement/git/portillon-nuxtjs/node_modules/element-plus/es/index.mjs".
at file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:2948:305
at async __instantiateModule__ (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:5151:3)
m.default is not a function
at file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:10:126
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async renderToString (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/node_modules/vue-bundle-renderer/dist/index.mjs:247:19)
at async renderMiddleware (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/nitro/index.mjs:233:20)
at async handle (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/node_modules/h3/dist/index.mjs:601:19)
any idea why ?
Best regards
same here on "element-plus": "^1.3.0-beta.10" and nuxt3
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/edouard/Développement/git/portillon-nuxtjs/node_modules/lodash/isEqual' imported from /home/edouard/Développement/git/portillon-nuxtjs/node_modules/element-plus/es/components/time-picker/src/common/picker.mjs
using this patch from commit b6c47adca53af3846742a2c5218bde82743381fb :
file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/node_modules/element-plus/es/components/popper/src/popper.mjs:1 import { placements } from '@popperjs/core'; ^^^^^^^^^^ SyntaxError: Named export 'placements' not found. The requested module '@popperjs/core' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from '@popperjs/core'; const { placements } = pkg; at ModuleJob._instantiate (internal/modules/esm/module_job.js:124:21) at async ModuleJob.run (internal/modules/esm/module_job.js:179:5) at async Loader.import (internal/modules/esm/loader.js:178:24) at async __instantiateModule__ (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:5151:3) [vite dev] Error loading external "/home/edouard/Développement/git/portillon-nuxtjs/node_modules/element-plus/es/index.mjs". at file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:2948:305 at async __instantiateModule__ (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:5151:3) m.default is not a function at file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/dist/server/server.mjs:10:126 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async renderToString (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/node_modules/vue-bundle-renderer/dist/index.mjs:247:19) at async renderMiddleware (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/.nuxt/nitro/index.mjs:233:20) at async handle (file:///home/edouard/D%C3%A9veloppement/git/portillon-nuxtjs/node_modules/h3/dist/index.mjs:601:19)
any idea why ?
Best regards
Still having the same issue with:
"element-plus": "^2.1.10", "nuxt3": "^3.0.0-27506609.eed7036",
Kind regards
Cannot find module 'D:\web\node_modules\lodash\isEqual' imported from D:\web\node_modules\element-plus\es\components\time-picker\src\common\picker.vue_vue&type=script&lang .mjs