question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: ENOENT: no such file or directory

See original GitHub issue

Hey there,

Am I doing something wrong here?

The error;

Error: ENOENT: no such file or directory, open '/foo/bar/output/Resources-icons/wish.svg'
    at components.forEach (~/bar/node_modules/@figma-export/output-components-as-svg/index.js:11:20)
    at Array.forEach (<anonymous>)
    at pages.forEach (~/bar/node_modules/@figma-export/output-components-as-svg/index.js:9:24)
    at Array.forEach (<anonymous>)
    at ~/bar/node_modules/@figma-export/output-components-as-svg/index.js:8:15
    at Promise.all.outputters.map (~/bar/node_modules/@figma-export/core/lib/export-components.js:21:53)
    at Array.map (<anonymous>)
    at Object.components (~/bar/node_modules/@figma-export/core/lib/export-components.js:21:34)

.figmaexportrc.js

module.exports = {
  commands: [
    [
      "components",
      {
        fileId: "XXX",
        onlyFromPages: ["Resources"],
        transformers: [
          require("@figma-export/transform-svg-with-svgo")({
            plugins: [{ removeViewBox: false }, { removeDimensions: true }]
          })
        ],
        outputters: [
          require("@figma-export/output-components-as-svg")({
            output: "./output"
          })
        ]
      }
    ]
  ]
};

run command

figma-export use-config

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
marcomontalbanocommented, Feb 9, 2020

Hi, the issue you mentioned opening this ticket has been fixed (#26). I also created #34 to track SVGR support.

1reaction
marcomontalbanocommented, Jan 19, 2020

To reduce complexity in your configuration file you can extract your function into a separate file so you have a .figmaexportrc clean and readable.

Regarding your configuration I see few lines that are too specific to your implementation, I’m not sure that we can generalize them. I can write a configurable svgr plugin for figma-export, trying to achieve your same result (thanks for suggestion).

Anyway writing your own figma-export plugin is totally fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve Nodejs: Error: ENOENT: no such file or directory
Your app is expecting to find a file at /home/embah/node/nodeapp/config/config.json but that file does not exist (which is what ENOENT ...
Read more >
How To Fix the “Enoent” Error? - Position Is Everything
No such files or directory means that the library is currently needed or the executable binary doesn't exist. Conclusion. Let's review what we...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
The error message was npm ERR! enoent ENOENT: no such file or directory, ... delete node-modules folder; run command npm cache clean --force ......
Read more >
ENOENT: no such file or directory · Issue #1171 - GitHub
After updating from 6.3.0 to 6.4.1 I've got errors. node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */) ...
Read more >
ENOENT No Such File or Directory Open - YouTube
In This Video We Will See How to Fix npm ERR Code ENOENT npm ERR syscall Open Error or ENOENT No Such File...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found