-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
In a file (for debugging purposes) I have:
import R from 'ramda'
...
window.R = RThis causes the following build error in webpack:
ERROR in ./frontend/src/utils.js
Module build failed: TypeError: /Users/andrew/Projects/TransparentClassroom/frontend/src/utils.js: Property property of MemberExpression expected node to be of a type ["Identifier"] but instead got "NullLiteral"
at validate (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-types/lib/definitions/index.js:109:13)
at Object.validate (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-types/lib/definitions/core.js:412:50)
at Object.validate (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-types/lib/index.js:505:9)
at NodePath._replaceWith (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-traverse/lib/path/replacement.js:176:7)
at NodePath.replaceWith (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-traverse/lib/path/replacement.js:160:8)
at PluginPass.Identifier (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-plugin-ramda/lib/index.js:134:16)
at newFn (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/andrew/Projects/TransparentClassroom/node_modules/babel-traverse/lib/path/context.js:105:12)
@ ./frontend/src/application.js 17:13-31
@ ./frontend/src/locales/application.en.js
@ multi (webpack)-dev-server/client?http://localhost:3808 ./frontend/src/locales/application.en.js
webpack: Failed to compile.
When I comment out the line window.R = R, everything compiles fine.
Have others seen this before?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels