build fail error with ctrl_tinycolor
LarryZhao0616 opened this issue · comments
hi, I haven't build my project for about 1 month. Today I tried to build it without any change except that I deleted my node_modules(then npm i). And my builder resulted in this error:
ERROR in ./~/_@ctrl_tinycolor@3.2.0@@ctrl/tinycolor/dist/index.js
Module parse failed: /Users/sihanzhao/Documents/code/acorn-vc-asset/node_modules/source-map-loader@1.1.3@source-map-loader/dist/cjs.js!/Users/sihanzhao/Documents/code/acorn-vc-asset/node_modules/@ctrl_tinycolor@3.2.0@@ctrl/tinycolor/dist/index.js Unexpected token (74:43)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (74:43)
@ctrl_tinycolor is not my direct dependencies, I didn't know this package before. can someone help me how can I build through this error? thx
The parsing error is related to **
:
Are you using an old version of Node.js? It has been available in Node.js since v7.
See related also related PR #202
available in Node.js since v7
I'm using v10.22.1 (nvm use 10)
this is my babel versions:
"babel-core": "^6.3.26",
"babel-loader": "^6.2.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
finally I found the reason why this happened.
one of my dependency was:
"@ant-design/icons": "^4.2.2",
I noticed that one month ago antd-icon just upgrade from 4.2.2 to 4.3.0.
when I changed it back to 4.2.2, everything would be fine!
Thank you @mikaello ! I really appreciate your help.
on webpack3 , upgrading to latest antd- v4 is breaking the build
including icons as direct dep and limiting to these versions will not include @ctrl_tinycolor and hence build is passing
antd@4.2.5
@ant-design/icons@4.2.2
Reverted to math.pow on the latest version https://github.com/scttcper/tinycolor/releases/tag/v3.2.1
You might still run into other issues.
on 3.2.0 the error during build (from UglifyJs) was occurring at this Line
Line 37 in 349909b
ERROR in 2.20d9257c3af8c23cdd6d.chunk.js from UglifyJs
Unexpected token: name (h) [2.20d9257c3af8c23cdd6d.chunk.js:12426,8]