You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error: Error: Cannot find module 'svgo-autocrop'
I'm trying to use this plugin but the config with the require("svgo-autocrop") doesn't seem to be able to find it even tho I have installed it globally with npm.
(I edited issue title from the node error message mentioned in OP when making this comment)
I understand now that it is not possible to import the code from a global npm install, but that leaves the question open: How can I add a plugin like this to my global svgo config file in my .config folder. Installing this script in a particular folder and running that with the config works but I would like it to be available globally so I don't have to worry about my current working directory when doing my optimise svg command.
aslak01
changed the title
Error: Cannot find module 'svgo-autocrop'
How to install this plugin globally?
Sep 6, 2023
I get this error:
Error: Cannot find module 'svgo-autocrop'
I'm trying to use this plugin but the config with the
require("svgo-autocrop")
doesn't seem to be able to find it even tho I have installed it globally with npm.npm ls -g --depth 0
:The text was updated successfully, but these errors were encountered: