1

bin/sh/:1:cross-env: not found.

error command failed with exit code 127

Using nextJs with the custom express server. If I remove cross-env from the script then it is showing Express is not found

[2021-07-20 12:08:54] yarn run v1.22.10
[2021-07-20 12:08:54] $  cross-env NODE_ENV=production node server/index.js
[2021-07-20 12:08:55] /bin/sh: 1: cross-env: not found
[2021-07-20 12:08:55] error Command failed with exit code 127.
[2021-07-20 12:08:55] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

issue package.json

  • Please add any code or errors as properly formatted text to the question. Do _not_ use images for code. – juliomalves Jul 20 '21 at 17:39
  • I solved that issue.. the problem was I was not rebuilding the app. It was using the last build-cache which has no cross_env modules. – Ameed Faridi Aug 02 '21 at 12:45

0 Answers0