You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Trying to copy a file from the snapshot filesystem to the real filesystem results in the following error: ENOENT: no such file or directory. Seems to happen in all versions after 4.2.4.
Trying to copy a file from the snapshot filesystem to the real filesystem results in the following error: ENOENT: no such file or directory. Seems to happen in all versions after 4.2.4.
I get the same error when calling a fs.copy, but I would not like to manually rewrite it (to be able to apply those workarounds), since there is a lot of things made on fs-extra.
Hi, @igorklopov thanks for your great work. However, this issue is indeed a pain in our application and still not fixed for two years. Do you have any plans to get this issue to be solved, or suggest some work rounds. Many thanks and wish you a good day.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
Hi everyone, I use pkg like you for my projects and when I find a bug I try to fix it my self, fixing this is not so difficult as it just require to add a patch like the one specified by @medikoo in prelude/bootstrap.js.
Please if you use this project help to keep it maintained by contributing to it.
@robertsLando I like it, i think the only thing is that it may lead people to not understand context when working with this package. If they inadvertently forget to include a file in the snapshot and it loads a file from the filesystem instead it could cause some issues or in a worst case scenario a vulnerability. I think that's why this hasn't been patched/implemented.
Activity
jsonmaur commentedon May 14, 2018
Using ncp as a temporary workaround since it doesn't rely on the
fs.copyFilefunction.jdziat commentedon Jun 14, 2018
Another option that works is to use:
AxelTerizaki commentedon Jul 9, 2018
I can confirm your little trick worked out for me o/
sqliang commentedon Apr 3, 2019
Maybe pkg does not kidnap function
fs.copyFile. I meet the same issue, and I resolve it by replace copyFile with readFile & writeFile:paulocoghi commentedon Apr 18, 2019
What can we do when using
fs-extra?I get the same error when calling a
fs.copy, but I would not like to manually rewrite it (to be able to apply those workarounds), since there is a lot of things made on fs-extra.jdziat commentedon Apr 18, 2019
You need to not use the copy method from the fs-extra package. It must do something with path that pkg intercepts/changes.
paulocoghi commentedon Apr 19, 2019
It seems to be a regression bug, since it worked fine until
4.2.6.jingsam commentedon Dec 24, 2019
This issue is still not solved. Any progress on this issue? @igorklopov
jingsam commentedon Jul 2, 2020
Hi, @igorklopov thanks for your great work. However, this issue is indeed a pain in our application and still not fixed for two years. Do you have any plans to get this issue to be solved, or suggest some work rounds. Many thanks and wish you a good day.
medikoo commentedon Jul 2, 2020
We workaround this issue by loading the following patch at beginning of the main module: https://github.com/serverless/serverless/blob/94ff3b22ab13afc60fb4e672520b4db527ee0432/lib/utils/standalone-patch.js
ryanaltair commentedon Sep 3, 2020
this work with pkg 4.4.9
with node14
github-actions commentedon Apr 20, 2021
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
medikoo commentedon Apr 20, 2021
.
3 remaining items
jingsam commentedon Sep 26, 2021
bump
github-actions commentedon Dec 26, 2021
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
paulocoghi commentedon Dec 27, 2021
.
robertsLando commentedon Dec 27, 2021
Hi everyone, I use pkg like you for my projects and when I find a bug I try to fix it my self, fixing this is not so difficult as it just require to add a patch like the one specified by @medikoo in
prelude/bootstrap.js.Please if you use this project help to keep it maintained by contributing to it.
Thanks
fix: copyFile and copyFileSync patch
robertsLando commentedon Jan 20, 2022
PR ready to fix this
jdziat commentedon Jan 20, 2022
@robertsLando I like it, i think the only thing is that it may lead people to not understand context when working with this package. If they inadvertently forget to include a file in the snapshot and it loads a file from the filesystem instead it could cause some issues or in a worst case scenario a vulnerability. I think that's why this hasn't been patched/implemented.
robertsLando commentedon Jan 20, 2022
@jdziat IMO the patch should be integrated to bootstrap as lot users are having this issue
jdziat commentedon Jan 20, 2022
@robertsLando Not disagreeing but you may want to make it possible to turn this off via a flag.
soopermodel commentedon Jul 17, 2023
bump