redux-undo: Build error related to babel

v0.6.0

error: bundling failed: "TransformError: [app_folder]/node_modules/redux-undo/lib/index.js: [BABEL] [app_folder]/node_modules/redux-undo/lib/index.js: Using removed Babel 5 option: [app_folder]/node_modules/redux-undo/.babelrc.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"

v0.6.1

error: bundling failed: "TransformError: [app_folder]/node_modules/redux-undo/lib/index.js: Couldn't find preset \"es2015\" relative to directory \"[app_folder]/node_modules/redux-undo\""

v1.0.0-beta9-9-6

error: bundling failed: "TransformError: [app]/node_modules/redux-undo/lib/index.js: Unknown plugin \"add-module-exports\" specified in \"[app]/node_modules/redux-undo/.babelrc\" at 0, attempted to resolve relative to \"[app]/node_modules/redux-undo\""

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 22 (4 by maintainers)

Most upvoted comments

I have such version in package.json:

"redux-undo": "1.0.0-beta9-9-7"

And it’s giving me same error:

ERROR in ./node_modules/redux-undo/lib/index.js
Module build failed: ReferenceError: Unknown plugin "add-module-exports" specified in "(...)node_modules/redux-undo/package.json" at 0, attempted to resolve relative to "(...)/node_modules/redux-undo"

Am I missed something?

released beta9-9-7 with a fix for this

So I fixed this by manually removing the node_modules/redux-undo/.babelrc file. When redux-undo gets distributed, it is already transformed so you don’t need the .babelrc. This is indeed an issue with the library.

I also got this to work by modifying the .babelrc and adding the following field: "ignore": ["lib/"] since lib/ is already transformed. I’ll create a PR for @omnidan to review–not sure if this or npmignore-ing .babelrc is the preferred approach

EDIT: actually, I think I’ll go with "only": ["src/"] since that is more explicit with src/ being the only place where es6 code lives for now