zoukankan      html  css  js  c++  java
  • Error: Cannot find module 'webpack'错误解决

    $ npm install webpack -g
     
    $ npm install webpack-cli -g
    全局安装webpack
    
    $ npm run dev
     
    Error: Cannot find module 'webpack'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
        at Function.Module._load (internal/modules/cjs/loader.js:506:25)
        at Module.require (internal/modules/cjs/loader.js:636:17)
        at require (E:webpack
    ode_modulesv8-compile-cachev8-compile-cache.js:159:20)
        at Object.<anonymous> (E:webpack
    ode_moduleswebpack-cliinconvert-argv.js:7:24)
        at Module._compile (E:webpack
    ode_modulesv8-compile-cachev8-compile-cache.js:178:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
        at Module.load (internal/modules/cjs/loader.js:598:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
        at Function.Module._load (internal/modules/cjs/loader.js:529:3)
        at Module.require (internal/modules/cjs/loader.js:636:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at yargs.parse (E:webpack
    ode_moduleswebpack-cliincli.js:241:14)
        at Object.parse (E:webpack
    ode_modulesyargsyargs.js:567:18)
        at E:webpack
    ode_moduleswebpack-cliincli.js:219:8
        at Object.<anonymous> (E:webpack
    ode_moduleswebpack-cliincli.js:538:3)
        at Module._compile (internal/modules/cjs/loader.js:688:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
        at Module.load (internal/modules/cjs/loader.js:598:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
        at Function.Module._load (internal/modules/cjs/loader.js:529:3)
        at Module.require (internal/modules/cjs/loader.js:636:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at module.exports.filename (C:UsersjinruAppDataRoaming
    pm
    ode_moduleswebpack-cli
    ode_modulesimport-localindex.js:16:66)
        at C:UsersjinruAppDataRoaming
    pm
    ode_moduleswebpack-cliincli.js:13:6
        at Object.<anonymous> (C:UsersjinruAppDataRoaming
    pm
    ode_moduleswebpack-cliincli.js:538:3)
        at Module._compile (internal/modules/cjs/loader.js:688:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
        at Module.load (internal/modules/cjs/loader.js:598:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    解决方法
    
    $ npm link webpack
    ---------------------
    

      

  • 相关阅读:
    NET 中反射的用法
    Prism 框架解读之一系列
    委托(Delegate)
    Python NameError:name ‘xrange’ is not defined
    Python import commands ImportError: No module named 'commands'
    Python import commands ImportError: No module named 'commands'
    Python3 TypeError: initial_value must be str or None, not bytes
    Python3 TypeError: initial_value must be str or None, not bytes
    Python import urllib2 ImportError: No module named 'urllib2'
    Python import urllib2 ImportError: No module named 'urllib2'
  • 原文地址:https://www.cnblogs.com/wujindong/p/10984496.html
Copyright © 2011-2022 走看看