Home > Mobile >  Error: Cannot find module 'C:\...\node_modules\isexe\index.js'. Please verify that the
Error: Cannot find module 'C:\...\node_modules\isexe\index.js'. Please verify that the

Time:04-22

I am running npm run test:CI (jest-html-reporter) in Bamboo CI but this error occurred:

node:internal/modules/cjs/loader:361
throw err;
^
Error: Cannot find module 'C:\...\node_modules\isexe\index.js'. Please verify that the package.json has a valid "main" entry

The main in my package.json is set to 'dist/index.js'

What is this error and how can I resolve it?

CodePudding user response:

Can you try to clean the cache:

npm cache clean

If it doesn't work try:

npm cache clean --force

Also, I cannot see your folder structure, but I think the route is: './dist/index.js', not 'dist/index.js'.

  • Related