[Bug] Builds are failing with a module not found exception
molant opened this issue · comments
Antón Molleda commented
Latest CI builds are failing in *NIX OSes with the following message:
Processing "/Users/runner/work/1/s/packages/hint-axe/package.json"
Prebuilding...
cd /Users/runner/work/1/s/packages/hint-axe/ && npm run prebuild
> @hint/hint-axe@4.4.20 prebuild /Users/runner/work/1/s/packages/hint-axe
> node ./scripts/create.js
internal/modules/cjs/loader.js:357
throw err;
^
Error: Cannot find module '/Users/runner/work/1/s/node_modules/@hint/utils-types/dist/src/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:349:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:562:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:917:27)
at Function.Module._load (internal/modules/cjs/loader.js:774:27)
at Module.require (internal/modules/cjs/loader.js:1003:19)
at require (internal/modules/cjs/helpers.js:107:18)
at Object.<anonymous> (/Users/runner/work/1/s/packages/hint-axe/scripts/create/create-metas.js:1:22)
at Module._compile (internal/modules/cjs/loader.js:1114:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:979:32) {
code: 'MODULE_NOT_FOUND',
path: '/Users/runner/work/1/s/node_modules/@hint/utils-types/package.json',
requestPath: '@hint/utils-types'
The same error happens on Windows but it continues the execution and ends up green.
Salem Olorundare commented
I had this issue, and it was because I had the wrong node and npm version.
If the node version is 14. There shouldn't be a problem