building-react-from-scratch icon indicating copy to clipboard operation
building-react-from-scratch copied to clipboard

Unknown plugin "transform-react-jsx" specified in "base" at 0

Open tsiq-swyx opened this issue 6 years ago • 1 comments

hey! trying to run this and getting this error:

ERROR in ../dilithium/dilithium.js
Module build failed: ReferenceError: Unknown plugin "transform-react-jsx" specified in "base" at 0, attempted to resolve relative to "/Users/swyx/OpenSource/building-react-from-scratch/dilithium"
    at /Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-loader/lib/index.js:46:20)
    at Object.module.exports (/Users/swyx/OpenSource/building-react-from-scratch/demo/node_modules/babel-loader/lib/index.js:163:20)
 @ ./app.js 3:18-41

is this because the jsx transform was renamed or moved somehow?

tsiq-swyx avatar Mar 09 '18 05:03 tsiq-swyx

  1. remove node_modules
  2. npm i babel-core babel-plugin-transform-react-jsx babel-preset-env --save-dev
  3. npm i
  4. restart the project

huchangfa123 avatar Sep 21 '18 08:09 huchangfa123