react-json-tree
react-json-tree copied to clipboard
the example can't run successfully
after npm install & npm start
it show
Module build failed: ReferenceError: Unknown plugin "transform-decorators-legacy" specified in "/Users/HolaMan/Projects/react-json-tree/.babelrc" at 0, attempted to resolve relative to "/Users/HolaMan/Projects/react-json-tree" at /Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/file/options/option-manager.js:177:17 at Array.map (native) at Function.normalisePlugins (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/file/options/option-manager.js:153:20) at OptionManager.mergeOptions (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/file/options/option-manager.js:245:36) at OptionManager.init (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/file/options/option-manager.js:360:12) at File.initOptions (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/file/index.js:223:65) at new File (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/file/index.js:140:24) at Pipeline.transform (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-core/lib/transformation/pipeline.js:46:16) at transpile (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-loader/index.js:14:22) at Object.module.exports (/Users/HolaMan/Projects/react-json-tree/examples/node_modules/babel-loader/index.js:88:12) @ ./src/App.js 13:11-31
I haven't used the example provided in this repo, but I ran into this error.
The problem was that my webpack config rules were too permissive, so webpack was using the babel-loader for modules (like this one) which had already been transpiled.
The rules in the examples dir seem appropriate though.