webbf icon indicating copy to clipboard operation
webbf copied to clipboard

npm run build失败

Open chenming7583 opened this issue 8 years ago • 4 comments

verbose stack Error: Invalid version: "v0.1-alpha" 4 verbose stack at Object.fixVersionField (D:\Program Files\nodejs\node_modules\npm\node_modules\normalize-package-data\lib\fixer.js:191:13) 4 verbose stack at D:\Program Files\nodejs\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 (D:\Program Files\nodejs\node_modules\npm\node_modules\normalize-package-data\lib\normalize.js:31:15) 4 verbose stack at final (D:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:349:5) 4 verbose stack at then (D:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:124:5) 4 verbose stack at D:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:243:12 4 verbose stack at D:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16 4 verbose stack at tryToString (fs.js:426:3) 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:413:12)

chenming7583 avatar Feb 10 '17 09:02 chenming7583

修改一下版本就可以编译了

chenming7583 avatar Feb 13 '17 02:02 chenming7583

修改哪个版本?

xiaoyi62 avatar Feb 13 '17 08:02 xiaoyi62

Package.json

发件人: [email protected] [mailto:[email protected]] 代表 xiaoyi62 发送时间: 2017年2月13日 16:07 收件人: peterchenhdu/webbf [email protected] 抄送: chenming7583 [email protected]; Author [email protected] 主题: Re: [peterchenhdu/webbf] npm run build失败 (#5)

修改哪个版本?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/peterchenhdu/webbf/issues/5#issuecomment-279318670 , or mute the thread https://github.com/notifications/unsubscribe-auth/AFrZR2X68C1iBs3ZU_zkNuTTq_FWb7tQks5rcA8ygaJpZM4L9LEN . https://github.com/notifications/beacon/AFrZR5iUhKRTtMSxtuJmyBmHsXgEwNJpks5rcA8ygaJpZM4L9LEN.gif

chenming7583 avatar Feb 15 '17 06:02 chenming7583

因为版本号是x.y-alpha的格式了,不是通用的x.y.z。有两种方式解决:

  1. 把版本号改为0.1.0
  2. npm install semver

gujunhk avatar Mar 01 '17 03:03 gujunhk