Npm ERR! 404 Not Found: ansi-styles@https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz

Hi,

While building on Ionic Pro this error pops up:

Here is my ionic info:

cli packages: (C:\Users\Thijmen\Desktop\abk\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.3.0

System:

    Node : v8.10.0
    npm  : 5.8.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Hope some one can help me out.

Thanks

Maybe?

or

or

Already tried that, it’s not the solution for me.
Also removed node_modules and reinstalled everything but doesn’t solved the problem.

did you remove package-lock.json too while doing so?

have you found which library reference ansi-styles-2.2.0?

Yes

No, Can’t find it.

maybe something in the following issue?

Temporary, if you need to release, maybe adding it temporarly?

npm install ansi-styles@2.2.1 --save-dev

maybe? as an ugly workaround?

1 Like

Hi,

Added this package and now Im facing the following:

image

:frowning:

Did you ran a clean install first?

rm -r node_modules
rm package-lock.json

Your project is opensource? Should I try to built it on my laptop (you never know)?

2 Likes

Thanks, forgot that.
It’s working now :slight_smile:

1 Like

Awesome to hear that!

Still I think it’s only a workaround being force to reference by yourself ansi-styles is probably not a cool long term solution, try time to time to have an eye on it

I will, But it’s so weird, is there a tool or something to find out which module it could be what is giving this error?
A workaround is ok for now, Need to push new builds for the store.

Actually I’ve got the same question

For example in this not related issue Current version of the levelup dependency for this project has a known security vulnerability · Issue #13 · mafintosh/browserify-fs · GitHub, @jgw96 found out what was the reference but don’t know which tool he used

@wthijmen just found out the following post about npm cmd https://medium.freecodecamp.org/8-npm-tricks-you-can-use-to-impress-your-colleagues-dbdae1ef5f9e

in chapter 4, the editor display some commands to list installed packages, maybe it is what we were looking for while playing with the argument depth ?

 npm ls --depth 0

Man, you have no idea how much this helped me. Thank you so much. Thank you!

1 Like