search

Home  >  Q&A  >  body text

node.js - webpack在安装的时候出现问题

黄舟黄舟2786 days ago362

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 16:05:23

    They are all warnings, not errors. If you don’t understand them, just ignore them.

    You did not add the -g parameter, so it is installed within the project (in the directory) and should be run like this (Windows as an example)-g 参数,所以是项目内(目录内)安装,应该这样运行(Windows 为例)

    项目内安装的运行方式

    .\node_modules\.bin\webpack --version

    如果你想在任何地方运行,需要全局安装

    全局安装

    npm install -g webpack

    在配置了 PATH 的情况下(一般安装 NodeJS 的时候就会配置 PATH)可以直接 webpack

    How to run the installation within the project

    rrreee

    🎜 🎜If you want to run it anywhere, you need to install it globally🎜

    Global installation

    rrreee 🎜When PATH is configured (PATH is generally configured when NodeJS is installed), webpack can be run directly. 🎜

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 16:05:23

    Is it installed globally?

    npm install webpack -g

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 16:05:23

    Try specifying the installation version.

    Project folder installation
    npm install webpack@2.* --save-dev

    Global installation
    npm install -g webpack@2.*

    reply
    0
  • Cancelreply