files property exits with ENOTDIR when copying and renaming single files
See original GitHub issue- Version: 20.11.1 / 20.8.2
- Target: mac (dmg), win (nsis) and linux (tar.gz, .deb)
According to the docs, in v12.1.0, file mappings were introduced:
You can use file macros in the
from
andto
fields as well.from
andto
can be files and you can use this to rename a file while packaging.
However, using a files
configuration like:
files:
- from: app/build/bundle.js
to: app/build.js
Results in:
Error: ENOTDIR: not a directory, scandir '/Users/foo/project/app/build/bundle.js'
– I’ve double checked, the file at this location does exist.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Renaming single file names while copying entire folder using ...
OK, I found a solution. According to yeoman docs: Any generator author can register a transformStream to modify the file path and/or the...
Read more >File system | Node.js v19.3.0 Documentation
COPYFILE_EXCL : The copy operation will fail if dest already exists. fs.constants.COPYFILE_FICLONE : The copy operation will attempt to create a copy-on-write ...
Read more >CopyFiles@2 - Copy files v2 task - Microsoft Learn
Copy files v2 # Copy files from a source folder to a target folder using patterns matching file paths (not folder paths).
Read more >File — Elixir v1.12.3 - HexDocs
For example, one can copy a file via cp/3 and remove files and directories ... If it exists, it returns a {:ok, info}...
Read more >Node.js FS Module — Renaming Items and Removing ...
The original file must exist before renaming it. If the path of the item you want to rename to already exists, then that...
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
It seems this functionality is broken. I will check it tomorrow CET. Please try workaround:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.