Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when use babel-preset-env #22

Open
soakit opened this issue Oct 13, 2017 · 0 comments
Open

error when use babel-preset-env #22

soakit opened this issue Oct 13, 2017 · 0 comments

Comments

@soakit
Copy link

soakit commented Oct 13, 2017

babel

{
	"presets": [
		["env", {
			"useBuiltIns": "usage",
			"modules": false,
			"targets": {
				"browsers": ["last 5 versions", "ie >= 9"]
			}
		}]
	],
	"comments": false,
	"env": {
		"test": {
			"presets": ["env", "stage-2"],
			"plugins": ["istanbul"]
		}
	},
	"plugins": [
		"lodash",
		["transform-object-rest-spread", { "useBuiltIns": true }],
		["component", [
			{
			  "libraryName": "element-ui",
			  "styleLibraryName": "theme-default"
			}
		  ]]
	]
}

error in ./src/utils/logic-error.js

Module build failed: TypeError: E:\git\byd\web\src\utils\logic-error.js: Cannot read property 'file' of undefined
at buildExpressionHandler (E:\git\byd\web\node_modules\babel-plugin-component\lib\core.js:125:26)
at PluginPass.IfStatement (E:\git\byd\web\node_modules\babel-plugin-component\lib\core.js:266:11)
at newFn (E:\git\byd\web\node_modules\babel-traverse\lib\visitors.js:236:21)
at NodePath._call (E:\git\byd\web\node_modules\babel-traverse\lib\path\context.js:68:19)
at NodePath.call (E:\git\byd\web\node_modules\babel-traverse\lib\path\context.js:42:17)
at NodePath.visit (E:\git\byd\web\node_modules\babel-traverse\lib\path\context.js:99:12)
at TraversalContext.visitQueue (E:\git\byd\web\node_modules\babel-traverse\lib\context.js:137:18)
at TraversalContext.visitMultiple (E:\git\byd\web\node_modules\babel-traverse\lib\context.js:91:17)
at TraversalContext.visit (E:\git\byd\web\node_modules\babel-traverse\lib\context.js:176:19)
at Function.traverse.node (E:\git\byd\web\node_modules\babel-traverse\lib\index.js:108:17)
at NodePath.visit (E:\git\byd\web\node_modules\babel-traverse\lib\path\context.js:110:19)
at TraversalContext.visitQueue (E:\git\byd\web\node_modules\babel-traverse\lib\context.js:137:18)
at TraversalContext.visitSingle (E:\git\byd\web\node_modules\babel-traverse\lib\context.js:96:19)
at TraversalContext.visit (E:\git\byd\web\node_modules\babel-traverse\lib\context.js:178:19)
at Function.traverse.node (E:\git\byd\web\node_modules\babel-traverse\lib\index.js:108:17)
at NodePath.visit (E:\git\byd\web\node_modules\babel-traverse\lib\path\context.js:110:19)

@ ./src/utils/api-client.js 3:0-39
@ ./src/store/index.js
@ ./src/main.js
@ multi ./build/dev-client ./src/main.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant