【问题标题】:Typings: SyntaxError: Unexpected token =>打字:语法错误:意外的令牌=>
【发布时间】:2017-05-02 08:37:12
【问题描述】:

运行打字命令时,我总是收到错误:

AppData\Roaming\npm\node_modules\typings\node_modules\strip-bom\index.js:2
module.exports = x => {
                   ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (AppData\Roaming\npm\node_modules\typings\node_modules\typings-core\dist\utils\fs.js:5:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

到目前为止,我尝试重新安装类型 (v 2.0.0)、npm cache clean 和所有这些,但它似乎无法修复它。

【问题讨论】:

  • 我也有同样的问题.. 你找到解决办法了吗?
  • 原来升级我的 node.js 版本为我解决了这个问题.. node = new version-hell?
  • 运行过时版本的软件是如何成为“版本地狱”的?

标签: typescript npm typescript-typings


【解决方案1】:

在windows下,我得到了node 0.12版本,卸载它,重新安装了版本6.9.x。问题得到了解决。谢谢。

【讨论】:

    【解决方案2】:

    我只是从node page安装新版本的node,不需要先卸载它,因为二进制文件被覆盖了。

    【讨论】:

      猜你喜欢
      • 2019-10-26
      • 2016-10-31
      • 1970-01-01
      • 1970-01-01
      • 2019-10-28
      • 2019-01-17
      • 1970-01-01
      • 1970-01-01
      • 2017-01-16
      相关资源
      最近更新 更多