在vs code里运行ionic命令,提示错误,请问怎么解决
path地址配置错误
参考和这个错误有关系吗?我怎么找不到解决方案
@alger_li: 可以不用自己再命令行运行 ionic 命令吧
@alger_li: 你直接从 windows 打开命令行可以运行吗?
@dudu: 用cmd不行,用node带的控制台可以
@alger_li: 应该是 PATH 环境变量的原因,请看 nodevars.bat 中的内容
@echo off
rem Ensure this Node.js and npm are first in the PATH
set "PATH=%APPDATA%\npm;%~dp0;%PATH%"
setlocal enabledelayedexpansion
pushd "%~dp0"
rem Figure out the Node.js version.
set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'"
for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v
rem Print message.
if exist npm.cmd (
echo Your environment has been set up for using Node.js !version! and npm.
) else (
echo Your environment has been set up for using Node.js !version!.
)
popd
endlocal
rem If we're in the Node.js directory, change to the user's home dir.
if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%"
@dudu: 应该怎么改过来
@alger_li: 你自己可以搞定