I am trying to install lerna using npm , packages are successfully added but when I run any command of lerna it comes out as.
我尝试使用npm安装lerna,成功添加了包,但是当我运行lerna的任何命令时,它就会出来。
bash: lerna: command not found
bash: lerna:没有找到命令
Node Version : v8.10.0
节点版本:v8.10.0
Npm Version : 3.10.9.
Npm版本:3.10.9。
Here's what I am trying:
以下是我正在尝试的:
$ npm install --global lerna
C:\Users\<user-name>\AppData\Roaming\npm\lerna -> C:\Users\<user-name>\AppData\Roaming\npm\node_modules\lerna\bin\lerna.js
C:\Users\<user-name>\AppData\Roaming\npm
`--lerna@2.11.0
VaibhavPC@Vaibhav MINGW64 ~/Projects/lerna init
bash: lerna: command not found
4 个解决方案
#1
#2
6
Three things:
三件事:
- Please check environment, if the path is correctly setup or not, for command not found error.
- 请检查环境,如果路径是否正确设置,对于没有发现错误的命令。
- Second, you can go directly lerna folder and execute the command. If you are able to run from here that means problem is there in path ie point 1
- 其次,可以直接访问lerna文件夹并执行命令。如果你能从这里运行,这意味着问题在路径(1)中
- The third option is re-install and install it again.
- 第三种选择是重新安装并重新安装。
#3
0
I faced this issue when I installed lerna using yarn. Reinstalling using npm solved the issue.
我在使用纱线安装lerna时遇到了这个问题。使用npm重新安装解决了这个问题。
#4
-1
Here's a repo you can try to learn lerna in a independent environment
这里有一个回购协议,你可以尝试在一个独立的环境中学习lerna
#1
4
1) Check the ENVIRONMENT_VARIABLES
that is NODE_PATH
is present or not. If not, then have to append the path to PATH
environment variable.
1)检查NODE_PATH变量是否存在。如果没有,则必须将路径附加到path环境变量。
2) Re-install again
2)再重新安装
#2
6
Three things:
三件事:
- Please check environment, if the path is correctly setup or not, for command not found error.
- 请检查环境,如果路径是否正确设置,对于没有发现错误的命令。
- Second, you can go directly lerna folder and execute the command. If you are able to run from here that means problem is there in path ie point 1
- 其次,可以直接访问lerna文件夹并执行命令。如果你能从这里运行,这意味着问题在路径(1)中
- The third option is re-install and install it again.
- 第三种选择是重新安装并重新安装。
#3
0
I faced this issue when I installed lerna using yarn. Reinstalling using npm solved the issue.
我在使用纱线安装lerna时遇到了这个问题。使用npm重新安装解决了这个问题。
#4
-1
Here's a repo you can try to learn lerna in a independent environment
这里有一个回购协议,你可以尝试在一个独立的环境中学习lerna