babel-plugin-import icon indicating copy to clipboard operation
babel-plugin-import copied to clipboard

SyntaxError: Unexpected token ...

Open zhaoxm2016 opened this issue 3 years ago • 4 comments

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

zhaoxm2016 avatar Feb 23 '21 06:02 zhaoxm2016

+1,请问你解决了吗

huajiayi avatar Mar 01 '21 08:03 huajiayi

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前边的^去掉

huajiayi avatar Mar 01 '21 09:03 huajiayi

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 ?

ravi100k avatar Jun 11 '21 07:06 ravi100k

update nodejs to v8.6.0.

Arweil avatar Jun 28 '21 08:06 Arweil