Open J-env opened 1 year ago
Sorry, ignore my previous reply. You have posted issue to wrong repository, this is for @iconify/json-tools
package.
rootDir()
doesn't exist in new version. Use locate()
:
const { locate } = require('@iconify/json');
return locate(name);
Could someone have a look into fixing this, please? :)
There is nothing to fix. You are trying to use function that doesn't exist, but there is a different function. See example above.
Sure, but I'm not using the non-existing function myself, but it's rather called inside findIconifyCollection()
, so would require an update to the json-tools library.
Thanks! Now it makes sense.
This package has version 1 of @iconify/json
as dependency, where that function exists. In version 2 it no longer exists, so with intended version it does work correctly.
This package is deprecated and no longer maintained, though I forgot to update readme file to mention it and to archive it.
I'll probably see if it can be updated to support both versions. If it works, I'll publish update. However, package will still be marked as deprecated.
Alright, I see! As a quick workaround for people, who still want to keep using their scripts, I figured that you can also just replace collection.loadIconifyCollection(name)
by collection.loadFromFile(locate(prefix))
.