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


#1

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


#2

Maybe?

or

or


#3

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


#4

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


#5

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


#6

Yes

No, Can’t find it.


#7

maybe something in the following issue?


#8

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

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

maybe? as an ugly workaround?


#9

Hi,

Added this package and now Im facing the following:

image


#10

: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)?


#11

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


#12

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


#13

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.


#14

Actually I’ve got the same question

For example in this not related issue https://github.com/mafintosh/browserify-fs/issues/13, @jgw96 found out what was the reference but don’t know which tool he used


#15

@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