代码之家  ›  专栏  ›  技术社区  ›  Vinoth Marieswaran

发生错误时停止npm安装

  •  0
  • Vinoth Marieswaran  · 技术社区  · 7 年前

    发生错误时停止npm安装

    npm ERR! 404  '@typescript-eslint/parser@^1.3.0' is not in the npm registry.
    npm ERR! 404 Your package name is not valid, because
    npm ERR! 404  1. name can only contain URL-friendly characters
    npm ERR! 404 It was specified as a dependency of 'angular-gettext-tools'
    

    2 回复  |  直到 7 年前
        1
  •  0
  •   Kishan Oza    7 年前

    试试这个

    npm install @typescript-eslint/parser --save-dev
    
        2
  •  0
  •   Patricio Vargas    7 年前

    npm install @typescript-eslint/parser --save-dev
    

    然后: 在ESLint配置文件中,设置parser属性:

      {
      "parser": "@typescript-eslint/parser"
    }
    

    更多信息: https://www.npmjs.com/package/typescript-eslint-parser

        3
  •  0
  •   Vinoth Marieswaran    7 年前

    我在“.npmrc”文件中添加了下面的一行,然后问题就解决了

    @typescript-eslint:registry="https://registry.npmjs.org"