美文网首页
npm install chromedriver --chrom

npm install chromedriver --chrom

作者: GaoXiaoGao | 来源:发表于2020-09-10 16:08 被阅读0次

    npm install时出现以下问题

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! chromedriver@2.46.0 install: `node install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the chromedriver@2.46.0 install script.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\andro\AppData\Roaming\npm-cache\_logs\2020-09-10T08_00_03_863Z-debug.log
    PS D:\Project\vueworkspace\demo01> node install.js
    internal/modules/cjs/loader.js:583
        throw err;
        ^
    
    Error: Cannot find module 'D:\Project\vueworkspace\demo01\install.js'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
        at Function.Module._load (internal/modules/cjs/loader.js:507:25)
        at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
        at startup (internal/bootstrap/node.js:283:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
    

    这是vue-cli的bug,解决办法是
    npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
    再执行
    npm i

    参考
    https://www.cnblogs.com/yflbk-2016/p/13299564.html

    相关文章

      网友评论

          本文标题:npm install chromedriver --chrom

          本文链接:https://www.haomeiwen.com/subject/raueektx.html