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

545
Views
after webpack i got error Cannot find module 'resolve-cwd'?
**I got error while webpack** 
error is :
webpack
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'resolve-cwd'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/share/nodejs/webpack/node_modules/import-local/index.js:3:20)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

please help me to resolved this problem. I tried this one npm install resolve-cwd . still i am getting same issues after type webpack.i also delete node_module folder and package_json_lock file and npm install .after this run webpack still got same above error .

node --version
v10.19.0

npm --version
7.10.0
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I'm not entirely sure why this happened. But I can speculate that it is due to old webpack version.

I've faced this issue right now. I had installed webpack using apt (on Ubuntu 20.04.2 (Focal Fossa)).

Reinstalling webpack using npm resolved the issue.
Steps I followed:

$ rm $(which webpack); # removes the currently installed webpack
                       # you can replace $(which webpack) with the webpack location
$ npm i -g webpack webpack-cli
over 4 years ago · Santiago Trujillo Report

0

I had the same issue with Resolve-CwD. But in my case it was caused by yarn not installing webpack properly.

You have an older version of node so try updating it and see if the above steps are working.

If it's not working then i'd say you try an older version of Ruby until the current issue with har-validator is sorted

In my case the error was caused because yarn was using har-validatior which is deprecated and just couldn't install webpack completely

over 4 years ago · Santiago Trujillo Report

0

Despite installing the missing module 'resolve-cwd' it kept failing with another missing module.

I had to delete the node_modules folder then re-running the npm install command to install dependencies. This worked for me

over 4 years ago · Santiago Trujillo Report
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!