YMFE / yicon

可部署的矢量字体图标(IconFont)管理平台
https://yicon.ymfe.org/
Apache License 2.0
366 stars 78 forks source link

npm WARN Invalid version: "1.0.2.1" #30

Closed user999987 closed 7 years ago

user999987 commented 7 years ago

最新版本 yicon install 无法构建 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/node-v4.8.3-linux-x64/bin/node', 1 verbose cli '/usr/local/node-v4.8.3-linux-x64/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build' ] 2 info using npm@3.10.10 3 info using node@v4.8.3 4 verbose stack Error: Invalid version: "1.0.2.1" 4 verbose stack at Object.module.exports.fixVersionField (/usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/normalize-package-data/lib/fixer.js:191:13) 4 verbose stack at /usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js:32:38 4 verbose stack at Array.forEach (native) 4 verbose stack at normalize (/usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js:31:15) 4 verbose stack at final (/usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/read-package-json/read-json.js:349:5) 4 verbose stack at then (/usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5) 4 verbose stack at /usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/read-package-json/read-json.js:243:12 4 verbose stack at /usr/local/node-v4.8.3-linux-x64/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3) 5 verbose cwd /app/yicon/src 6 error Linux 2.6.32-573.el6.x86_64 7 error argv "/usr/local/node-v4.8.3-linux-x64/bin/node" "/usr/local/node-v4.8.3-linux-x64/bin/npm" "run" "build" 8 error node v4.8.3 9 error npm v3.10.10 10 error Invalid version: "1.0.2.1" 11 error If you need help, you may report this error at: 11 error <https://github.com/npm/npm/issues> 12 verbose exit [ 1, true ]

JasonFang93 commented 7 years ago

失败的原因是 1.0.2.1 版本号不符合 semver 规范,导致无法执行 npm install 等一系列操作,我们在新版 yicon-builder 工具里面做了兼容处理,同时也发布了新版本 yicon,可以试试 : )