I am trying to install ionic.
I had set up node.js, Java SDK. and ionic via node.js
When I tried to run ionic from cmd, I got the below error.
> C:\Users\aaa>ionic info
> module.js:472
> throw err;
> ^
>
> Error: Cannot find module 'C:\Users\aaa\AppData\Roaming\npm\de_modules\ionic\bin\ionic'
> at Function.Module._resolveFilename (module.js:470:15)
> at Function.Module._load (module.js:418:25)
> at Module.runMain (module.js:605:10)
> at run (bootstrap_node.js:423:7)
> at startup (bootstrap_node.js:147:9)
> at bootstrap_node.js:538:3
>
> C:\Users\aaa>
Why ı am getting this message ?
I have tried to re install several times. but the result is the same.
I have Found the problem.
My ionic.cmd
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\de_modules\ionic\bin\ionic" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\de_modules\ionic\bin\ionic" %*
)
there has invalid path.
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\ionic\bin\ionic" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\node_modules\ionic\bin\ionic" %*
)
I changed like thar. The Problem solved. Thanks.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.