kentcdodds / cross-env

🔀 Cross platform setting of environment scripts

Home Page:https://www.npmjs.com/package/cross-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'isexe'

its-dibo opened this issue · comments

commented
Cannot find module 'isexe'
Require stack:
- /home/runner/work/almogtama3/almogtama3/node_modules/cross-env/node_modules/which/which.js
- /home/runner/work/almogtama3/almogtama3/node_modules/cross-env/node_modules/cross-spawn/lib/util/resolveCommand.js
- /home/runner/work/almogtama3/almogtama3/node_modules/cross-env/node_modules/cross-spawn/lib/parse.js
- /home/runner/work/almogtama3/almogtama3/node_modules/cross-env/node_modules/cross-spawn/index.js
- /home/runner/work/almogtama3/almogtama3/node_modules/cross-env/src/index.js
- /home/runner/work/almogtama3/almogtama3/node_modules/cross-env/src/bin/cross-env.js
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! almogtama3@1.0.0 build: `npx cross-env NODE_ENV=production npm run build:all`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the almogtama3@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2020-04-30T15_46_25_632Z-debug.log
##[error]Process completed with exit code 1.

this error happens when installing only devDependencies, including cross-env.

more details

Just a maybe, but did you first installed cross-env as a dev dependency and moved it later in runtime dependencies? If so, be sure to run npm install to update your package.lock. Check your package.lock sur isexe and check if it says dev: true. If so, this is your problem. Running npm install should fix the issue.