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

Webpack build errors in 1.1.2/1.1.3 #11

Open
BusterNeece opened this issue Jan 11, 2023 · 1 comment
Open

Webpack build errors in 1.1.2/1.1.3 #11

BusterNeece opened this issue Jan 11, 2023 · 1 comment

Comments

@BusterNeece
Copy link

BusterNeece commented Jan 11, 2023

Hey there! I recently updated from version 1.1.1 to version 1.1.3, and I think I may have identified a possible regression when building my application via Webpack 5.

The following errors appear, and appear to have to do with this specific library:

ERROR in ./node_modules/vue-codemirror6/dist/index.es.js 13:0-37
Module not found: Error: Can't resolve 'lodash/compact' in '/data/frontend/node_modules/vue-codemirror6/dist'
Did you mean 'compact.js'?
BREAKING CHANGE: The request 'lodash/compact' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
resolve 'lodash/compact' in '/data/frontend/node_modules/vue-codemirror6/dist'
  Parsed request is a module
  using description file: /data/frontend/node_modules/vue-codemirror6/package.json (relative path: ./dist)
    resolve as module
      /data/frontend/node_modules/vue-codemirror6/dist/node_modules doesn't exist or is not a directory
      looking for modules in /data/frontend/node_modules/vue-codemirror6/node_modules
        /data/frontend/node_modules/vue-codemirror6/node_modules/lodash doesn't exist
      /data/frontend/node_modules/node_modules doesn't exist or is not a directory
      looking for modules in /data/frontend/node_modules
        existing directory /data/frontend/node_modules/lodash
          using description file: /data/frontend/node_modules/lodash/package.json (relative path: .)
            using description file: /data/frontend/node_modules/lodash/package.json (relative path: ./compact)
              Field 'browser' doesn't contain a valid alias configuration
              /data/frontend/node_modules/lodash/compact doesn't exist

ERROR in ./node_modules/vue-codemirror6/dist/index.es.js 14:0-31
Module not found: Error: Can't resolve 'lodash/trim' in '/data/frontend/node_modules/vue-codemirror6/dist'
Did you mean 'trim.js'?
BREAKING CHANGE: The request 'lodash/trim' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
resolve 'lodash/trim' in '/data/frontend/node_modules/vue-codemirror6/dist'
  Parsed request is a module
  using description file: /data/frontend/node_modules/vue-codemirror6/package.json (relative path: ./dist)
    resolve as module
      /data/frontend/node_modules/vue-codemirror6/dist/node_modules doesn't exist or is not a directory
      looking for modules in /data/frontend/node_modules/vue-codemirror6/node_modules
        /data/frontend/node_modules/vue-codemirror6/node_modules/lodash doesn't exist
      /data/frontend/node_modules/node_modules doesn't exist or is not a directory
      looking for modules in /data/frontend/node_modules
        existing directory /data/frontend/node_modules/lodash
          using description file: /data/frontend/node_modules/lodash/package.json (relative path: .)
            using description file: /data/frontend/node_modules/lodash/package.json (relative path: ./trim)
              Field 'browser' doesn't contain a valid alias configuration
              /data/frontend/node_modules/lodash/trim doesn't exist

The errors aren't present in 1.1.1, so I'm not immediately sure what caused them. Reverting to that version resolves them completely in my case.

@logue
Copy link
Owner

logue commented Jan 12, 2023

It may be the effect of changing the way lodash is read in 1.1.2. I will release a fixed version later.

logue added a commit that referenced this issue Jan 12, 2023
Update dependencies.
Fixed eslint import configure.
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

No branches or pull requests

2 participants