Terminal 'ionic start' gives npm ERR

I am trying to start my first ionic project (based on VUE, on a windows machine, with Visual Studio Code as text editor and terminal), following the steps on How to Install The Ionic Framework CLI to Build Mobile Apps

I tried reinstalling nodejs, tried uninstalling ionic > npm cache clear --force > reinstall, as well as launching Visual Studio Code in admin mode. Keep getting same error below. I am out of options, any advice?

? Starter template: blank
√ Preparing directory .\myapp in 1.41ms
√ Downloading and extracting blank starter in 320.71ms
> ionic integrations enable capacitor --quiet -- myapp io.ionic.starter
> npm.cmd i --save -E @capacitor/core@latest
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN ERESOLVE overriding peer dependency
npm ERR! code ECONNRESET
npm ERR! network aborted
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Local\npm-cache\_logs\2022-07-18T02_58_39_592Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.

        npm.cmd i --save -E @capacitor/core@latest exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Installing dependencies may take several minutes.

  ──────────────────────────────────────────────────────────────────────────────

         Ionic Advisory, tailored solutions and expert services by Ionic

                             Go to market faster
                    Real-time troubleshooting and guidance
        Custom training, best practices, code and architecture reviews
      Customized strategies for every phase of the development lifecycle

               Learn more: https://ion.link/advisory

  ──────────────────────────────────────────────────────────────────────────────


> npm.cmd i
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN ERESOLVE overriding peer dependency
npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
npm ERR! 13168:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\User\AppData\Local\npm-cache\_logs\2022-07-18T02_59_54_033Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.

        npm.cmd i exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Hi
Just out of curiosity- are you in a corporate network or something similarly heavily secured? With firewalls and sonon?

No just regular home wifi with regular windows 10 firewall (not even antivirus software running on this device). I also tried disabling windows firewall, as well as making sure nodejs has exceptions in β€˜allow apps through firewall settings’.

Ok not sure what helps here. Maybe someone else can chip in

Can u post ionic info here? (From the project directory)

And I reckon you kniw you should not use elevated permissions to install stuff with npm (as administrator)

It’s your network. restart network and see if that helps.

I am not sure what was the step actually helped, but I cleared ionic, nodejs, restarted my network, did fresh installation on nodejs again, ionic installation from admin powershell, ionic start on C:\ folder and finally ionic serve didn’t give the error and launched as a blank. I will now keep working on tutorials to try to build the app and check whether ionic serve will keep working. Thanks for all the answers.

1 Like