Unable to find modules required to enroll admin in Fabcar example – Hyperledger fabric

I am pretty new to Hyperledger fabric and StackOverflow as well. I was trying to experiment with the fabcar example – https://hyperledger-fabric.readthedocs.io/en/release-1.4/write_first_app.html on Hyperledger. However, I am unable to proceed with enrolling the Admin.

After issuing

npm install
node enrollAdmin.js

in the fabcar/javascript directory, I am hitting the error

  throw err;

Error: Cannot find module './utils.js'
Require stack:
- /b/workspace/fabric-samples/fabcar/javascript/node_modules/fabric-ca-client/lib/FabricCAServices.js
- /b/workspace/fabric-samples/fabcar/javascript/node_modules/fabric-ca-client/index.js
- /b/workspace/fabric-samples/fabcar/javascript/enrollAdmin.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/b/workspace/fabric-samples/fabcar/javascript/node_modules/fabric-ca-client/lib/FabricCAServices.js:10:15)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19) {
  requireStack: [

I’m not sure if this is some single sourcing problem between the fabric client and the fabric-ca-client. I have tried uninstalling and reinstalling nodejs and npm. I have also tried pruning all the docker images, networks, volumes and start from scratch.

Here’s the package.json for reference:

    "name": "fabcar",
    "version": "1.0.0",
    "description": "FabCar application implemented in JavaScript",
    "engines": {
        "node": ">=8",
        "npm": ">=5"
    "scripts": {
        "lint": "eslint .",
        "pretest": "npm run lint",
        "test": "nyc mocha --recursive"
    "engineStrict": true,
    "author": "Hyperledger",
    "license": "Apache-2.0",
    "dependencies": {
        "fabric-ca-client": "~1.4.0",
        "fabric-network": "~1.4.0"
    "devDependencies": {
        "chai": "^4.2.0",
        "eslint": "^5.9.0",
        "mocha": "^5.2.0",
        "nyc": "^13.1.0",
        "sinon": "^7.1.1",
        "sinon-chai": "^3.3.0"
    "nyc": {
        "exclude": [
        "reporter": [
        "all": true,
        "check-coverage": true,
        "statements": 100,
        "branches": 100,
        "functions": 100,
        "lines": 100

Can someone please help me find out what I might be missing here?

Environment details:

Ubuntu on Windows Subsystem for Linux

Node js version: v12.16.1

npm version: 6.13.4

Docker compose version: docker-compose version 1.22.0, build f46880fe

Docker version: Docker version 19.03.6, build 369ce74a3c

Fabric binaries: 1.4.0

Source: StackOverflow