Svgo: no such file or directory .svgo.yml

Created on 11 Nov 2016  ·  31Comments  ·  Source: svg/svgo

Warning: Error: ENOENT: no such file or directory, open 'F:\Source\node_modules\svgo.svgo.yml'

getting the error when installed with yarn package manager.

Most helpful comment

I noticed this problem with Yarn after someone had run yarn clean. Deleting the .yarnclean file, deleting node_modules, then re-running yarn fixed it.

All 31 comments

svgo/lib/svgo/config.js reeds ${__dirname}/../../.svgo.yml, so the target file should be svgo/.svgo.yml. It seems like something went wrong.

I noticed this problem with Yarn after someone had run yarn clean. Deleting the .yarnclean file, deleting node_modules, then re-running yarn fixed it.

Confirming @chrisvfritz fix. Thanks.

@chrisvfritz confirming as well. thank you kindly.

@chrisvfritz Confirmed! I faced this issue unexpectedly when trying to use css-loader with webpack....

@chrisvfritz Thanks !

For whatever reason this fix doesn’t work for me.

Is there a way that we can make this library more compatible with Yarn so that this fix is not needed?

There's an open issue regarding *.yml files in .yarnclean at yarnpkg/yarn#2276

@chrisvfritz Worked for me, too. Thanks!

Thanks for the fix @chrisvfritz ! Just saved me a lot of trouble.

Thanks @chrisvfritz and @zrrtcs. Removing *.yml and .*.yml (and any other entries that should not be deleted) from my .yarnclean file fixed my issues.

@chrisvfritz Thanks!

@chrisvfritz Thanks!

@chrisvfritz Thanks!

@chrisvfritz Thanks!

Thanks :)

Thanks , saved my life.

@chrisvfritz Thank you!

@chrisvfritz Thanks! ;)

@chrisvfritz Cheers!

@chrisvfritz thanks

Instead of deleting the whole .yarclean file or removing the lines *.yml and .*.yml, you can add a new line in your .yarclean to ignore this specific file: !svgo/.svgo.yml

@dcifuen Worked like a charm. Thanks!

@chrisvfritz Thanks!

still doin whatever it's doin. Fix above worked.

@chrisvfritz Thanks a lot!

@pcwa-ahendricks @aap82 @teonik @valotvince @khzaw @matthieusb @pearman @bytedaring @jochemjanssens @tommueller @LaravelMonster @soulomoon @LinusBorg @joneslloyd @Cecilxx @brandondurham @junen0511 @disarticulate @jeantimex

Don't thank me. Thank git diff HEAD^.

Batman Grapple Away

But seriously, please just add a reaction. 😅 I've unsubscribed from this thread so many times, but every mention subscribes me again.

@dcifuen your solution worked perfectly, thanks! 👍

Sometimes svgo can be referenced by other installed modules, in such case you need to change @dcifuen suggestion to !.svgo.yml - it will ignore .svgo.yml in all subfolders.

I'm trying to use the SVGO with the https://github.com/nklayman/vue-cli-plugin-electron-builder and experiencing the /electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/../../.svgo.yml issue. I can confirm that I don't have a .yarnclean file, nor yarn is cleaning anything as I verified it by manually checking the /node_modules/svgo/svgo.yml file and it's there. Anyone got any idea?

Was this page helpful?
0 / 5 - 0 ratings