umijs / babel-plugin-import

Modularly import plugin for babel.
3.16k stars 404 forks source link

SyntaxError: Unexpected token ... #580

Open zhaoxm2016 opened 3 years ago

zhaoxm2016 commented 3 years ago

node版本:8.1.1 "babel-plugin-import": "^1.6.2", 最近删除依赖重新拉取之后,报以下错误 return {...pluginState.selectedMethods[methodName]}; ^^^ SyntaxError: Unexpected token ... 请教一下如何解决

huajiayi commented 3 years ago

+1,请问你解决了吗

huajiayi commented 3 years ago

node版本:8.1.1 "babel-plugin-import": "^1.6.2", 最近删除依赖重新拉取之后,报以下错误 return {...pluginState.selectedMethods[methodName]}; ^^^ SyntaxError: Unexpected token ... 请教一下如何解决

解决了,在package.json中把babel-plugin-import版本号固定一下就好了,我是用的1.6.3,你试试把^1.6.2前边的^去掉

ravi100k commented 3 years ago

Same error while building the code browserify js. return {...pluginState.selectedMethods[methodName]}; npm -v 5.0.3 node -v 8.1.2

any work around for it ?

Arweil commented 3 years ago

update nodejs to v8.6.0.