Issue
I want to install ionic 6 on my system. I have installed multiple versions of npm on my system using nvm .
nvm ls
D:\<user_name>\Projects\Ionic-6>nvm ls
* 16.14.2 (Currently using 64-bit executable)
16.14.0
16.13.1
14.17.3
12.19.0
10.0.0
8.9.4
When I run npm install -g @ionic/cli
I am getting below error:
D:\<user_name>\Projects\Ionic-6>npm install -g @ionic/cli
npm ERR! Unexpected token '.'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\<user_name>\AppData\Local\npm-cache\_logs\2022-04-01T11_25_55_752Z-debug-0.log
Error Logs
27 verbose stack C:\Users\<user_name>\AppData\Roaming\nvm\v16.14.2\node_modules\npm\node_modules\libnpmfund:1
27 verbose stack ../workspaces/libnpmfund
27 verbose stack ^
27 verbose stack
27 verbose stack SyntaxError: Unexpected token '.'
27 verbose stack at Object.compileFunction (node:vm:352:18)
27 verbose stack at wrapSafe (node:internal/modules/cjs/loader:1032:15)
27 verbose stack at Module._compile (node:internal/modules/cjs/loader:1067:27)
27 verbose stack at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
27 verbose stack at Module.load (node:internal/modules/cjs/loader:981:32)
27 verbose stack at Function.Module._load (node:internal/modules/cjs/loader:822:12)
27 verbose stack at Module.require (node:internal/modules/cjs/loader:1005:19)
27 verbose stack at require (node:internal/modules/cjs/helpers:102:18)
27 verbose stack at Object.<anonymous> (C:\Users\<user_name>\AppData\Roaming\nvm\v16.14.2\node_modules\npm\lib\utils\reify-output.js:16:38)
27 verbose stack at Module._compile (node:internal/modules/cjs/loader:1103:14)
28 verbose cwd D:\
29 verbose Windows_NT 10.0.19041
30 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@ionic/cli"
31 verbose node v16.14.2
32 verbose npm v8.5.0
33 error Unexpected token '.'
34 verbose exit 1
35 timing npm Completed in 683ms
36 verbose code 1
37 error A complete log of this run can be found in:
37 error C:\Users\<user_name>\AppData\Local\npm-cache\_logs\2022-04-01T11_17_49_197Z-debug-0.log
Solution
I resolved the issue by installing the latest version of nvm-windows
Answered By - Mr. Void
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.