I am working to refactor an old code, need to replace cpx package as it has been abandoned. So I have a below line in package.json file:
"scripts": {
"dist": "cpx node_modules/**/dist/*.* Content/lib --v & cpx node_modules/**/dist/**/*.* Content/lib",
"media": "cpx node_modules/**/media/*.* Content/lib --v & cpx node_modules/**/media/**/*.* Content/lib",
"build": "npm run dist && npm run media"
}
I don't know node, npm much. Tried to replace cpx with cpx2, but when building fs-extra and universalify give errors "TypeError name is not defined". What is the purpose of above line and how it could be refactored? Appreciate the help.
Errors are below:
node_modules\universalify\index.js:15
2021-10-13T14:40:10.4697291Z }, 'name', { value: fn.name })
2021-10-13T14:40:10.4697705Z ^
2021-10-13T14:40:10.4698282Z TypeError: Cannot read property 'name' of undefined \node_modules\universalify\index.js:15
2021-10-13T14:40:10.4689312Z }, 'name', { value: fn.name })
2021-10-13T14:40:10.4689805Z ^
2021-10-13T14:40:10.4690389Z TypeError: Cannot read property 'name' of undefined