Auth0, Ionic Project Setup, npm install and updates seem to be cancelling each other, creating dependency errors

I’m trying to test Auth0, it should be a good setup for our situation. I’m downloading the Ionic project from Auth0 and trying to follow their instructions. After npm install, every next step seems to derail the initial npm install work and cause errors.

Instructions from Auth0,
https://auth0.com/docs/quickstart/native/ionic

(some notes in the readme that add detail compared to web page)

Install Dependencies

If you’re using this sample as a base for your project, you can just run npm install

The initial npm install seems to run fine. However, as soon as you take the next step to install the plugin my project starts throwing CLI Errors,
ionic cordova plugin add cordova-plugin-safariviewcontroller
[ERROR] Error occurred while loading plugins. CLI functionality may be limited.
Checking for CLI updates now…
[ERROR] No updates found after plugin error–please report this issue.
? The plugin @ionic/cli-plugin-cordova is not installed. Would you like to install it and continue?
(Y/n)

If i answer Y to install the cli … things just seem to go downhill with errors…

** Yes**
> npm install --save-dev --save-exact @ionic/cli-plugin-cordova@latest
x Running command - failed!
Exception: WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning
INTEGRITY: sha1-2PobTdGn5vCbGOdR4sNj4Ya7bY0= integrity checksum failed when using sha1: wanted sha1
2PobTdGn5vCbGOdR4sNj4Ya7bY0= but got sha512-riH3qc11S1Q1OsQgawTYG8KAVZ6Mls9cS1pAcmYGFfV59vdoWHzUpVF
EtHLrfrcGzW31uLErAHjKQN1+w6t6g==. (1050867 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error duri
g revalidation.
npm WARN @ionic/cli-utils@1.0.0-rc.1-alpha.62022768 requires a peer of strip-ansi@^3.0.1 but none w
s installed.

npm ERR! path c:\auth2\node_modules\cordova-android\node_modules\balanced-match
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename ‘c:\auth2\node_modules\cordova-android\no
e_modules\balanced-match’ -> 'c:\auth2\node_modules\cordova-android\node_modules.balanced-match.DE
ETE’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mgp788\AppData\Roaming\npm-cache_logs\2017-07-15T06_17_41_306Z-debug.log

Then usually see errors like different modules require peer services that won’t seem to update, etc.

Just trying to get going with a sample. The auth0 material looks really good, have been surprised at how many hours lost trying to figure out what I can’t get the sample download to even the basic run.

If anyone has a clue, would appreciate, save people hours spinning wheels.

Thanks…

Still working through the process…

However, have a strong note for anyone else who might be experiencing…the Auth0 doc’s only show a single line for the plug ins like the safari view controller. if you look at the Ionic documentation…they always use a two step process of the cordova first and then the ionic…

https://ionicframework.com/docs/native/safari-view-controller/

$ ionic cordova plugin add cordova-plugin-safariviewcontroller
$ npm install --save @ionic-native/safari-view-controller

Also…a note for anyone trying to get a new project started. The below linked helped clarify the format for the customurlscheme parameters which comes during the middle of the configuration if your packages are working.
https://github.com/EddyVerbruggen/Custom-URL-scheme
cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=mycoolapp


Currently, looking at creating an Ionic project from scratch, seeing if the plugins call all be added without running into the errors following the ‘npm install’ after downloading the Auth0 starter project.

Something is messing with your connection to NPM. This will make installing packages successfully impossible.

Try the same steps on your mobile hotspots connection - and/or at another computer. It might be a proxy, cencorship, virus, or similar.[quote=“earlpond_se, post:2, topic:98281”]
the Auth0 doc’s only show a single line for the plug ins like the safari view controller. if you look at the Ionic documentation…they always use a two step process of the cordova first and then the ionic…
[/quote]

That is because they don’t implement the view controller using Ionic Native but directly via the Cordova plugin. That is a choice they made.

Can you successfully create a blank project ( ionic start blank blank) and run it on your device?

Hi,

Thanks for the response.

I normally run ionic start sidemenu (successfully).

However, I’m wondering if something is getting caught for example with a v2 to v3 type update. I was actually looking at uninstalling npm, everything from my PC and starting everything over from scratch……spending today trying to make sure all my current work is correctly backed up before wiping PC.

Thanks – will try to re-run everything and test,
Earl.

Installing everything from a clean base (please use nvm or nvm-windows to install node - so much better) is always a good ideas in these cases. Maybe post your ionic info before you start though, could be all kinds of things wrong with your current setup.

Thank you for your feedback…

I think you hit on the key with the notes

“That is because they don’t implement the view controller using Ionic Native but directly via the Cordova plugin. That is a choice they made.”

I need to come back and retest…just ran out of time and used Firebase for now. Thanks again, still early in leaning Ionic well, appreciate the advice of those who have been there.