Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

319
Views
How to replace cpx in package.json script

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
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!