javascript - After node is installed, npm always reports that it is not an internal command. How to solve it?
给我你的怀抱
给我你的怀抱 2017-05-24 11:38:40
0
7
674

Overview

  • win10 system

  • Tried multiple versions of node

Question 1: The following error keeps reporting!

Problem 2: npm can install dependent packages, but it cannot run. For example, npm run dev, the following error will be reported

给我你的怀抱
给我你的怀抱

reply all(7)
Ty80

It should be that the environment variables are not set properly.
You can refer to here:/a/11...

phpcn_u1582

npm run dev must be run in the directory with package.json

刘奇

The directory is not entered, right?

左手右手慢动作

添加系统环境变量,选择安装的node目录

用户环境变量,也就是其他npm包的位置

世界只因有你

I guess it’s because the command line tool you have is not working properly. Don’t use the one that comes with node. Try using cmd

漂亮男人

Create a new user variable NODE_PATH in Advanced System Settings-Environment Variables
Value C:Program Filesnodejsnode_modules

左手右手慢动作

Does your node have environment variables?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!