asapach/babel-plugin-rewire-exports

t.cloneNode is not a function

vickyrobot opened this issue · 2 comments

React-Hot-Loader: Hot Module Replacement is not enabled
D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-core\lib\transformation\file\index.js:558
throw err;
^

TypeError: D:/Users/userid/Desktop/LocalBranch/project/src/server/repositories/user-repo.js: t.cloneNode is not a function
at PluginPass.ExportNamedDeclaration (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-plugin-rewire-exports\lib\index.js:234:25)
at newFn (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\visitors.js:276:21)
at NodePath._call (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\path\context.js:76:18)
at NodePath.call (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\path\context.js:48:17)
at NodePath.visit (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\path\context.js:105:12)
at TraversalContext.visitQueue (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\context.js:150:16)
at TraversalContext.visitMultiple (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\context.js:103:17)
at TraversalContext.visit (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\context.js:190:19)
at Function.traverse.node (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\index.js:114:17)
at NodePath.visit (D:\Users\userid\Desktop\LocalBranch\project\node_modules\babel-traverse\lib\path\context.js:115:19)

Could you please provide a repro case?

Since you are on Babel 6 you should be using version 0.x:

npm i -D babel-plugin-rewire-exports@0.x

See the note in the README:

The master branch targets Babel v7. 0.x branch supports Babel v6.