transliteration: Can't resolve "core-js" dependency. [BUG]

Hi there, so here is my issue.

I’m having package A which has transliteration as a dependency. And there is also package B, which has package A as a dependency. Once I’m building package A with webpack build is broken and i’m getting this error:

ERROR in ./node_modules/package-a/node_modules/transliteration/dist/browser/bundle.umd.min.js Module not found: Error: Can't resolve 'core-js/modules/es6.array.sort' in '/Users/igocooper/Projects/package-b/node_modules/package-a/node_modules/transliteration/dist/browser'

As a temporary workaround i’ve downgraded to v. 2.0.0 and it’s working fine. Was there any changes between 2.0.0 - 2.1.0 which might affect this?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 17 (7 by maintainers)

Most upvoted comments

import { transliterate } from 'transliteration/dist/node/src/node' works for me on 2.1.4 as a workaround.

Maybe this is an another bug but I got the errors after installing the package like:

npm i transliteration

Then I imported slugify like this:

import { slugify } from 'transliteration';

And when I restarted my project I got a bunch of the errors:


ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/a-function' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/advance-string-index' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/an-object' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/array-for-each' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/array-includes' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/array-iteration' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/array-method-has-species-support' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/create-property' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/descriptors' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/dom-iterables' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/export' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/fails' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/fix-regexp-well-known-symbol-logic' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/forced-string-trim-method' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/global' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/hide' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/indexed-object' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/inherit-if-required' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/is-array' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/is-forced' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/is-object' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/is-regexp' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/object-assign' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/object-define-property' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/object-get-own-property-names' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/object-keys' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/redefine' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/regexp-exec' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/regexp-exec-abstract' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/regexp-flags' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/require-object-coercible' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/set-species' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/sloppy-array-method' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/string-trim' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/to-absolute-index' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/to-indexed-object' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/to-integer' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/to-length' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/to-object' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'
ERROR in ./node_modules/transliteration/dist/browser/bundle.umd.min.js
Module not found: Error: Can't resolve '../internals/well-known-symbol' in '/Users/aleksey/IdeaProjects/mahuru/iwow/admin/node_modules/transliteration/dist/browser'

Oh wait it’s already out as 2.1.5