You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR in ./src/components/App.js
Module build failed: SyntaxError: C:/Users/Matt/Documents/GitHub/frontend/src/components/App.js: NodePath has been removed so is read-only. (This is an error on an internal node. Probably an internal error)
at File.buildCodeFrameError (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-core\lib\transformation\file\index.js:427:15)
at NodePath.buildCodeFrameError (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\index.js:140:26)
at NodePath._assertUnremoved (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\removal.js:70:16)
at NodePath.remove (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\removal.js:20:8)
at replaceGlobalWithCallExpression (C:\Users\Matt\Documents\GitHub\frontend\node_modules\emotion\lib\babel.js:264:23)
at PluginPass.TaggedTemplateExpression (C:\Users\Matt\Documents\GitHub\frontend\node_modules\emotion\lib\babel.js:91:13)
at newFn (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\visitors.js:276:21)
at NodePath._call (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\context.js:76:18)
at NodePath.call (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\context.js:48:17)
at NodePath.visit (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\context.js:105:12)
at TraversalContext.visitQueue (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\context.js:150:16)
at TraversalContext.visitSingle (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\context.js:108:19)
at TraversalContext.visit (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\context.js:192:19)
at Function.traverse.node (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\index.js:114:17)
at NodePath.visit (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\path\context.js:115:19)
at TraversalContext.visitQueue (C:\Users\Matt\Documents\GitHub\frontend\node_modules\babel-traverse\lib\context.js:150:16)
@ ./src/index.js 31:11-36 56:2-59:4 57:4-29
This is caused by these lines. The stuff inside the if block can be removed and the whole block can be replaced with the contents of the else block(path.replaceWith(t.identifier('undefined')))
The optimisation I was trying to with that if isn't needed since uglify will remove the undefined expression anyway.
@Geczy if you or anyone else wants to do this that would be great.
emotion
version: 6.0.3react
version: 15.6.1Relevant code.
What happened:
Suggested solution:
Assign injectGlobal to const
#186 (comment)
The text was updated successfully, but these errors were encountered: