Open xkeshav opened 1 month ago
Hi, have you tried specifying an absolute path for TEMPLATE_FOLDER
, or otherwise resolving it to an absolute path first?
As you mentioned it works fine locally, I assume it's an environmental issue and not an issue with the package.
You can also consider passing the cwd
option to the glob
settings, like here: https://github.com/adamreisnz/replace-in-file?tab=readme-ov-file#specify-glob-configuration
First, Thanks for amazing and useful package.
using it in building npm package and when test local it works fine but when do
npm pack
and when run it it gives errorhere is my folder structure
what I am doing is that check
__templates
folder all files and do some replacement and later move this folder on project root and this code is written in helpers/replace.js file as belowthis works fine in local but when I built as package uisng
npm pack
and now testing on one of project but it gives errorbelow is folder struture inside node_modules
and now it throw error asbelow
I know there is issue of path but when try to change
options-->files
value with relative but it throw errorso how does we solve this; how do we tell a file which is in src/helpers/ folder to check files which is above src folder ?