• npm ERR! mathine_call@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js` npm ERR! Exit status 1


    internal/modules/cjs/loader.js:583
        throw err;
        ^
    
    Error: Cannot find module 'webpack'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
        at Function.Module._load (internal/modules/cjs/loader.js:507:25)
        at Module.require (internal/modules/cjs/loader.js:637:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object.<anonymous> (/Users/shenzhenshimujinkejiyouxiangongsi/node_modules/webpack-cli/bin/convert-argv.js:7:24)
        at Module._compile (internal/modules/cjs/loader.js:689:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
        at Module.load (internal/modules/cjs/loader.js:599:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
        at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! mathine_call@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the mathine_call@1.0.0 dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/shenzhenshimujinkejiyouxiangongsi/.npm/_logs/2018-11-20T07_03_05_024Z-debug.log
     // Various Dev Server settings
        host: '192.168.0.21', // can be overwritten by process.env.HOST
        port: 1026, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
        autoOpenBrowser: true,
        errorOverlay: true,
        notifyOnErrors: true,
        poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-

     如果如上方法不行的话,

    webpack-dev-server  版本需要从最新版本降低到如下版本,因为开始构建项目的那个人所用的插件版本太低
    "webpack-dev-server": {
          "version": "2.11.3",
          "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.3.tgz",
          "integrity": "sha512-Qz22YEFhWx+M2vvJ+rQppRv39JA0h5NNbOOdODApdX6iZ52Diz7vTPXjF7kJlfn+Uc24Qr48I3SZ9yncQwRycg==",
          "dev": true,
          "requires": {
            "ansi-html": "0.0.7",
            "array-includes": "^3.0.3",
            "bonjour": "^3.5.0",
            "chokidar": "^2.0.0",
            "compression": "^1.5.2",
            "connect-history-api-fallback": "^1.3.0",
            "debug": "^3.1.0",
            "del": "^3.0.0",
            "express": "^4.16.2",
            "html-entities": "^1.2.0",
            "http-proxy-middleware": "~0.17.4",
            "import-local": "^1.0.0",
            "internal-ip": "1.2.0",
            "ip": "^1.1.5",
            "killable": "^1.0.0",
            "loglevel": "^1.4.1",
            "opn": "^5.1.0",
            "portfinder": "^1.0.9",
            "selfsigned": "^1.9.1",
            "serve-index": "^1.7.2",
            "sockjs": "0.3.19",
            "sockjs-client": "1.1.5",
            "spdy": "^3.4.1",
            "strip-ansi": "^3.0.0",
            "supports-color": "^5.1.0",
            "webpack-dev-middleware": "1.12.2",
            "yargs": "6.6.0"
          },
  • 相关阅读:
    网站微信扫码登陆总结以及在小程序登陆两者关联和关系,vue以及uniapp
    微信扫码登陆在chrome浏览器失败,浏览器禁止重定向
    element-ui多个表单如何同时验证
    vscode中react代码提示插件
    echarts主题全局颜色定义、自定义折线颜色--彩色折线图echarts
    vue本地储存加密
    Echarts多条折线图 y轴数值与实际值不符解决方法
    vue中swiper@5.3.6使用,
    解决 swiper设置loop为true时,echarts图表不显示
    vue+nginx配置,以及nginx配置跨域
  • 原文地址:https://www.cnblogs.com/edensyd/p/9989035.html
Copyright © 2020-2023  润新知