Terminal 'ionic start' gives npm ERR - ionic-framework

I am trying to start my first ionic project based on VUE, following the steps on https://ionicframework.com/docs/intro/cli
I 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.

I've had the same issue myself but not had much chance to do any digging in to why it's doing it yet but could be a breaking change in a newer version of Angular which the Ionic team haven't picked up on.
In the meantime (assuming you're using Angular), use:
ng serve and access it at http://localhost:4200.

Related

Error: package reason-react not found or built

After running:
bsb -init my-react-login-app -theme react
Then, I ran the following to, as I understand, build the project:
$npm run build
But, I got the following error output:
> my-react-login-app#0.1.0 build /Users/kevinmeredith/Workspace/my-react-login-app
> bsb -make-world
Package not found: resolving package reason-react in /
File "bsconfig.json", line 1
Error: package reason-react not found or built , if it is not built
Please run 'bsb -make-world', otherwise please install it
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-react-login-app#0.1.0 build: `bsb -make-world`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the my-react-login-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kevinmeredith/.npm/_logs/2018-06-24T01_36_13_899Z-debug.log
How can I resolve this issue?
See the readme; that template needs you to install reason-react through npm install or yarn add. After that it should work. We don't check in the entire reason-react dependency chain in the template.

Ionic Live Update (App Update Plugin)

I tried to implement this plugin and feature on my project but the documentation is too poor, and all the tutorials on internet are using a Cordova Hot Code Push plugin.
Unfortunately the installation of Cordova Hot Code Push CLI client, used by every single tutorial on internet about it, keeps getting an error on:
cordova hot code push error postinstall
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.3.0 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.3.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/midias14/.npm/_logs/2018-06-06T19_45_57_204Z-debug.log
And not being able to resolve, I'm trying to implement hard way.
Any help on doing by hand?
I'm on Ionic3, Ubuntu sys.
I had similar issue yesterday. Try install the plugin with flag --unsafe-perm=true.

Ionic 3 Google Maps Plugins

am using Ionic 3-Angular 4 to build an app, and I am trying to add Google Maps native SDK plugin and I keep getting the following Error:
Error: Failed to fetch plugin file:node_modules/cordova-plugin-googlemaps via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963229 Error output:
npm ERR! path C:\Users\shawe\Desktop\Xampp Server\Ionic\beitelmagdes\node_modules\cordova-plugin-googlemaps\npm-shrinkwrap.json
npm ERR! code ELOOP
npm ERR! errno -4067
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open 'C:\Users\shawe\Desktop\Xampp Server\Ionic\beitelmagdes\node_modules\cordova-plugin-googlemaps\npm-shrinkwrap.json'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shawe\AppData\Roaming\npm-cache_logs\2017-11-16T07_43_23_428Z-debug.log
[ERROR] An error occurred while running cordova plugin add cordova-plugin-googlemaps --variable
API_KEY_FOR_ANDROID=AIza... (exit code 1).
Please Help
I was having the same problem and seemed to be an issue with the repro. It is now working nicely if you follow the ionic-native documentation:
https://ionicframework.com/docs/native/google-maps/
$ ionic cordova plugin add cordova-plugin-googlemaps --variable
API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable
API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
$ npm install --save #ionic-native/google-maps

npm link <package> error code: 128

I am developing a piece of software and realised that a part of it should be a separate package. Before splitting the code, I decided to try the npm link command. I followed the npm documentation to create a dummy package (exactly what the documentation describes - exports.printMsg = function(){} ...) to link to and followed the documentation about npm link. The first part (symlink to /lib/node_modules) worked perfectly. The second part failed with following error message :
npm WARN deprecated node-uuid#1.4.1: Use uuid module instead
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t http://stash.grupa.onet/scm/oacc/node04-iconv.git
npm ERR!
npm ERR! fatal: unable to access 'http://stash.grupa.onet/scm/oacc/node04-iconv.git/': Could not resolve host: stash.grupa.onet
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lisa/.npm/_logs/2017-08-02T16_29_12_731Z-debug.log
Could you help me out, please? All I found about similar errors suggest to reboot my PC (what I did) or to upgrade npm (I am running 5.3.0).
What I don't understand is why a command that should symlink a package is trying to resolve something...

Serve error with ionic conference app

Trying to get ionic conference app (https://github.com/driftyco/ionic-conference-app) working.
ionic 2.1.13
npm version: 3.10.8
node version: 6.9.1
cordova version: 6.4.0
ionic serve -l results in the following output:
ionic-conference-app# ionic:serve C:\data\app\mkb
ionic-app-scripts serve "-l"
[13:21:16] ionic-app-scripts 0.0.44
[13:21:16] watch started ...
[13:21:16] build dev started ...
[13:21:16] clean started ...
[13:21:16] clean finished in less than 1 ms
[13:21:16] copy started ...
[13:21:16] transpile started ...
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8100
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program >
Files\nodejs\node_modules\npm\bin\npm-cli.js" "r
" "ionic:serve" "--" "-l"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-conference-app# ionic:serve: ionic-app-scripts serve "-l"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-conference-app# ionic:serve script 'ionic-app-
scripts serve "-l"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-conference-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve "-l"
npm ERR! You can get information on how to open an issue for this project with:
...
There was an error serving your Ionic application: There was an error with the spawned command: serve
Any ideas as to what has gone wrong?
Many thanks
I've just tried it and it was working for me. On the package.json, it's showing that it's using the latest rc3 ("ionic-angular": "2.0.0-rc.3-201611211919") so try to do the following:
Update your ionic CLI: npm install -g ionic
Delete your node folder and do again npm install
Now, what do you get with ionic serve ?
the error you get is
listen EADDRINUSE 0.0.0.0:8100
looks like the port 8100 is in use.
try running on a different port using
--port=8101
also you can change this value in the run.js file
The error suggests to me that the port is in use already.
In my case I closed my browser instances connected to my Ionic app and also closed down my other VS Code Ionic projects and tried running the ionic serve command again and this appeared to resolve the problem.