• npm install -g @angular/cli@latest 失败


    一开始的ERROR信息是

    error “@angular/compiler-cli” package was not properly installed

    尝试方案二时又出现了以下的ERROR信息

    npm ERR! code EINTEGRITY
    npm ERR! sha1-OmJbxBx6n5nVnWRVKFfdGvDt2dQ= integrity checksum failed when using sha1: wanted sha1-OmJbxBx6n5nVnWRVKFfdGvDt2dQ= but got sha1-PVZuUT5szAqjMvKCcIwuIcpR9KY=. (259028 bytes)

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:UsersspAppDataRoaming pm-cache_logs2017-09-20T04_31_14_778Z-debug.log

    尝试了多种方案

    方案一(失败)

    清除缓存

    npm cache verify
    

    方案二(失败)

    1.Uninstall and clean (global)

    rm -rf node_modules dist
    npm uninstall -g @angular/cli
    npm cache verify
    

    2.Reinstall and play (global)

    npm install -g @angular/cli@latest
    npm install
    ng serve
    

    最终的解决办法是

    grep -ir "sha1-OmJbxBx6n5nVnWRVKFfdGvDt2dQ= integrity checksum" (npm的安装目录)
    

    再次运行 npm install

    然后全局更新TypeScript和angular cli ,再目录更新TypeScript和angular cli
    ng server 完成

  • 相关阅读:
    检索COM类工厂中CLSID为{00024500-0000-0000-C000-000000000046}的组件时失败
    VSTO 开发中 应用ActionPane、CustomTaskPane
    Thread.Join()的详解
    HBase笔记
    Hive命令详解
    视频地址
    几种表
    如何将数据导入到hive中
    hdfs笔记
    分区表简介
  • 原文地址:https://www.cnblogs.com/AlienXu/p/8632855.html
Copyright © 2020-2023  润新知