Coder Social home page Coder Social logo

Does this actually work? about svgr HOT 4 CLOSED

gregberge avatar gregberge commented on July 28, 2024
Does this actually work?

from svgr.

Comments (4)

gregberge avatar gregberge commented on July 28, 2024 3

SVGR exposes a binary, if you install it using npm or yarn usage will not be the same.

Try using npx svgr, it should work. For more information refer to binary usage using yarn or npm.

from svgr.

icew1nd avatar icew1nd commented on July 28, 2024 3

While the npx solution is way better. Some are behind some arbitrary proxy rules that makes it impossible.

So what you want to do is install it to the project at run it directly with Node. IE:
npm i @svgr/cli --save-dev
node node_modules/@svgr/cli/bin/svgr -----commands here-------

for example:
npx @svgr/cli icons/clock-icon.svg

would be:
node node_modules/@svgr/cli/bin/svgr icons/clock-icon.svg

from svgr.

jcmpaymentez avatar jcmpaymentez commented on July 28, 2024

While the npx solution is way better. Some are behind some arbitrary proxy rules that makes it impossible.

So what you want to do is install it to the project at run it directly with Node. IE:
npm i @svgr/cli --save-dev
node node_modules/@svgr/cli/bin/svgr -----commands here-------

for example:
npx @svgr/cli icons/clock-icon.svg

would be:
node node_modules/@svgr/cli/bin/svgr icons/clock-icon.svg

Thaks!! It worked for me!

from svgr.

thewanionly avatar thewanionly commented on July 28, 2024

While the npx solution is way better. Some are behind some arbitrary proxy rules that makes it impossible.

So what you want to do is install it to the project at run it directly with Node. IE: npm i @svgr/cli --save-dev node node_modules/@svgr/cli/bin/svgr -----commands here-------

for example: npx @svgr/cli icons/clock-icon.svg

would be: node node_modules/@svgr/cli/bin/svgr icons/clock-icon.svg

This solution worked for me as well, thank you.

from svgr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.