Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line tool outputting to file with binary character appended to the beginning and fails to compile #953

Open
yemi33 opened this issue Apr 3, 2024 · 0 comments

Comments

@yemi33
Copy link

yemi33 commented Apr 3, 2024

馃悰 Bug Report

Output of CLI results in SyntaxError due to some binary character being appended to the beginning of the file content (it cannot be removed)

To Reproduce

Steps to reproduce the behavior:

  1. Using VSCode
  2. Ran npx @svgr/cli yourImage.svg > yourImage.tsx
  3. Ran 'prettier' on file
  4. Outputted yourImage.tsx does not compile with following SyntaxError:
    image

Expected behavior

A clear and concise description of what you expected to happen.
The resulting file compiles correctly.

Link to repl or repo (highly encouraged)

Please provide a minimal repository on GitHub.

Issues without a reproduction link are likely to stall.

Run npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard

Paste the results here:

## System:
 - OS: Windows 10 10.0.22631
 - CPU: (16) x64 Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
 - Memory: 34.48 GB / 63.95 GB
## Binaries:
 - Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
 - Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
 - npm: 9.7.1 - ~\AppData\Roaming\npm\npm.CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant