• npm install 常见报错与解决方案


    mpm ERR! Unexpected end of JSON input while parsing near ...
    
    npm ERR! errno -4048
    npm ERR! syscall scandir
    
    • 解决方案
    npm cache clean --force
    

    npm install

    npm ERR! cb() never called!
    npm ERR! This is an error with npm itself.
    
    • 解决方案
    1. 删除npm文件夹下面的node_modules
    2. 删除当前项目文件夹的node_modules
    3. 删除package-lock.json文件
    4. npm cache clean --force
    5. npm install
    
    npm ERR! chromedriver@2.46.0 install: `node install.js`
    npm ERR! Exit status 1
    
    npm ERR! deasync@0.1.21 install: `node ./build.js`
    npm ERR! Exit status 1
    
    npm ERR! phantomjs-prebuilt@2.1.13 install: `node install.js`
    npm ERR! Exit status 1
    
    • 解决方案

    类似所有的执行 node 命令的报错,基本都可以用这个方法解决#

    npm install --ignore-scripts
    
    npm install deasync@0.1.21 --ignore-scripts
    
    Cannot download 'xxxx'
    HTTP error 404 Not Found
    
    • 解决方案

    默认下载路径上无法找到对应的资源文件,直接手动修改包的下载地址即可#

    sass_binary_site = https://npm.taobao.org/mirrors/node-sass
    phantomjs_cdnurl = http://10.25.220.15:8080
    
  • 相关阅读:
    lua面向对象(定义与调用)
    luastring(字符串)
    luatable(表)
    lua面向对象(创建与实例化)
    pandas安装方法(常规安装失败解决方法)
    lua循环
    windows常用命令schtasks
    ios UI自动化 appium参数配置
    ios UI自动化环境配置
    jmeter进行websocket 通信
  • 原文地址:https://www.cnblogs.com/cwshuo/p/15420916.html
Copyright © 2020-2023  润新知