Error: ENOENT: no such file or directory
See original GitHub issueHey 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:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, the issue you mentioned opening this ticket has been fixed (#26). I also created #34 to track SVGR support.
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 forfigma-export
, trying to achieve your same result (thanks for suggestion).Anyway writing your own
figma-export
plugin is totally fine.