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.

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 and to fields as well. from and to 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:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
develarcommented, May 2, 2018

It seems this functionality is broken. I will check it tomorrow CET. Please try workaround:

files:
  - from: app/build/bundl*.js
    to: app
0reactions
stale[bot]commented, Jul 1, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

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