react-toolbox: Missing core-js dependencies

core-js dependencies are markes as dev in package.json, however

when I try https://github.com/react-toolbox/react-toolbox-example with react-toolbox 0.12.9 I’ll get build error:

ERROR in ./~/react-toolbox/lib/utils/polyfills.js
Module not found: Error: Cannot resolve module 'core-js/fn/array/from' in /Users/finch/dev/mapilary/mapilary-widget-ng/node_modules/react-toolbox/lib/utils
 @ ./~/react-toolbox/lib/utils/polyfills.js 3:0-32

ERROR in ./~/react-toolbox/lib/utils/polyfills.js
Module not found: Error: Cannot resolve module 'core-js/fn/array/iterator' in /Users/finch/dev/mapilary/mapilary-widget-ng/node_modules/react-toolbox/lib/utils
 @ ./~/react-toolbox/lib/utils/polyfills.js 5:0-36

ERROR in ./~/react-toolbox/lib/utils/polyfills.js
Module not found: Error: Cannot resolve module 'core-js/fn/map' in /Users/finch/dev/mapilary/mapilary-widget-ng/node_modules/react-toolbox/lib/utils
 @ ./~/react-toolbox/lib/utils/polyfills.js 7:0-25

ERROR in ./~/react-toolbox/lib/utils/polyfills.js
Module not found: Error: Cannot resolve module 'core-js/fn/string/starts-with' in /Users/finch/dev/mapilary/mapilary-widget-ng/node_modules/react-toolbox/lib/utils
 @ ./~/react-toolbox/lib/utils/polyfills.js 9:0-40

ERROR in ./~/react-toolbox/lib/utils/polyfills.js
Module not found: Error: Cannot resolve module 'core-js/fn/symbol' in /Users/finch/dev/mapilary/mapilary-widget-ng/node_modules/react-toolbox/lib/utils
 @ ./~/react-toolbox/lib/utils/polyfills.js 11:0-28

I had to install core-js to resolve this issue.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

@vinz243 Try delete your node_modules folder. Then run npm install core-js, and then do npm install.

Thanks! I copied my files to another folder except node_modules and ran npm install core-js and then npm install it worked!

Had the same problem with missing core-js. I think it should either be in peerDependencies instead of devDependencies (IMO the better option), or the readme should state that npm@3 is required.