node.js - webpack在安装的时候出现问题
黄舟
黄舟 2017-04-17 16:03:23
0
3
379
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
巴扎黑

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. 🎜
刘奇

Is it installed globally?

npm install webpack -g
大家讲道理

Try specifying the installation version.

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

Global installation
npm install -g webpack@2.*

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template