Module build failed Error
I'm trying to use this package, I npm install correctly (goes into package) and import it in the top of my jsx page but get the module build failed error Couldn't find preset "stage-0" relative to directory. Any idea why this is? thanks for any help
this is my full error
ERROR in ./~/react-color/lib/index.js Module build failed: Error: Couldn't find preset "stage-0" relative to directory "/Users/mkeigwin/Desktop/react-paint/node_modules/react-color" at /Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/options/option-manager.js:299:19 at Array.map (native) at OptionManager.resolvePresets (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/options/option-manager.js:270:20) at OptionManager.mergePresets (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/options/option-manager.js:259:10) at OptionManager.mergeOptions (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/options/option-manager.js:244:14) at OptionManager.init (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12) at File.initOptions (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/index.js:216:65) at new File (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/file/index.js:139:24) at Pipeline.transform (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-core/lib/transformation/pipeline.js:46:16) at transpile (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-loader/lib/index.js:41:20) at Object.module.exports (/Users/mkeigwin/Desktop/react-paint/node_modules/babel-loader/lib/index.js:138:12) @ ./src/components/App.jsx 1:667-689
@mkeigwin @casesandberg What was the fix for this? I am seeing this issue.
you need to make sure this is in your babel "presets" : ["stage-0"],
On Mar 14, 2017, at 2:04 AM, Chris Sanders [email protected] wrote:
@mkeigwin https://github.com/mkeigwin What was the fix for this? I am seeing this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/casesandberg/react-color/issues/299#issuecomment-286330696, or mute the thread https://github.com/notifications/unsubscribe-auth/AVFXYZHog9voEPQ7U52-BvbjfwJ2sXBhks5rli38gaJpZM4K6oVm.
Yes, you need to use Stage 0 in babel https://babeljs.io/docs/plugins/preset-stage-0/