hello, The disk on my computer was recently corrupted. I had to get it replaced. After replacing I have been having some serious problems reinstalling ionic.
after reinstalling node.js - 13.7.0
then in cmd after running npm install -g ionic
I get the following warning but seems to install ok.
npm WARN deprecated superagent@4.1.0: Please note that v5.0.1+ of superagent removes User-Agent
header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-
Agent header). This notice will go away with v5.0.2+ once it is released.
C:\Users\stephen\ionic -> C:\Users\stephen\node_modules\ionic\bin\ionic
+ ionic@5.4.15
added 247 packages from 154 contributors in 18.455s
I checked the version
ionic version
returned 5.4.15
But after running ionic start and run a blank project I get the following error.
npm WARN karma-jasmine-html-reporter@1.5.1 requires a peer of jasmine-core@>=3.5 but none is
installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\webpack-
dev-server\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11
(node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11:
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11
(node_modules\karma\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11:
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11
(node_modules\@angular\compiler-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11:
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2:
wanted
{ "os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code EEXIST
npm ERR! path C:\Users\stephen\test3\node_modules\browserslist\cli.js
npm ERR! dest C:\Users\stephen\test3\browserslist
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\stephen\test3\node_modules\browserslist\cli.js'
->
'C:\Users\stephen\test3\browserslist'
npm ERR! File exists: C:\Users\stephen\test3\browserslist
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\stephen\AppData\Roaming\npm-cache\_logs\2020-01-31T11_10_22_715Z-
debug.log
[ERROR] An error occurred while running subprocess npm.
It does create the blank project, but I attempt to serve it I get the following error:
ionic : The term 'ionic' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ ionic serve
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (ionic:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
The only possible error I can think of is my old user drive is stored on my desktop and duplicate file paths may exist (obviously not perfect duplicates but folder names etc)