构建npm时出错 invalid number
发布于 5 年前 作者 gyin 1098 次浏览 来自 问答
  • 点击构建npm时

提示

发生错误


SyntaxError: Invalid number (80:53)SyntaxError: Invalid number (80:53)


at Parser.pp$4.raise (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:2610:13)


at Parser.pp$8.readNumber (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:3393:32)


at Parser.pp$8.getTokenFromCode (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:3216:17)


at Parser.pp$8.readToken (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:2975:15)


at Parser.pp$8.nextToken (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:2966:15)


at Parser.pp$8.next (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:2923:8)


at Parser.pp$3.parseExprOp (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:1891:12)


at Parser.pp$3.parseExprOps (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:1876:90)


at Parser.pp$3.parseMaybeConditional (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:1857:19)


at Parser.pp$3.parseMaybeAssign (/Applications/wechatwebdevtools.app/Contents/Resources/package.nw/node_modules/acorn/dist/acorn.js:1832:19)

  • 跟踪发现时strict模式下使用了8进制整数作为 fs.open 的mode参数
2 回复

方便提供一下你安装的npm包名么?我这边调试一下这个包的构建。

请问楼主问题解决了,我这边也出现了这种情况,目前项目dependence还没有任何依赖

回到顶部