open-cli-tools / concurrently

Run commands concurrently. Like `npm run watch-js & npm run watch-less` but better.
https://www.npmjs.com/package/concurrently
MIT License
7.11k stars 231 forks source link

Cannot find module 'date-fns/format' #501

Closed jellydn closed 2 months ago

jellydn commented 2 months ago

Hi there,

Thank you for the great tool. I have used this on my https://github.com/jellydn/grpc-demo-monorepo and it's working great until recently I got this error.

hello-twirp:dev: node:internal/modules/cjs/loader:1148
hello-twirp:dev:   throw err;
hello-twirp:dev:   ^
hello-twirp:dev: 
hello-twirp:dev: Error: Cannot find module 'date-fns/format'
hello-twirp:dev: Require stack:
hello-twirp:dev: - /Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/src/flow-control/log-timings.js
hello-twirp:dev: - /Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/src/index.js
hello-twirp:dev: - /Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/bin/concurrently.js
hello-twirp:dev:     at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
hello-twirp:dev:     at Module._load (node:internal/modules/cjs/loader:986:27)
hello-twirp:dev:     at Module.require (node:internal/modules/cjs/loader:1233:19)
hello-twirp:dev:     at require (node:internal/modules/helpers:179:18)
hello-twirp:dev:     at Object.<anonymous> (/Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/src/flow-control/log-timings.js:31:34)
hello-twirp:dev:     at Module._compile (node:internal/modules/cjs/loader:1358:14)
hello-twirp:dev:     at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
hello-twirp:dev:     at Module.load (node:internal/modules/cjs/loader:1208:32)
hello-twirp:dev:     at Module._load (node:internal/modules/cjs/loader:1024:12)
hello-twirp:dev:     at Module.require (node:internal/modules/cjs/loader:1233:19) {
hello-twirp:dev:   code: 'MODULE_NOT_FOUND',
hello-twirp:dev:   requireStack: [
hello-twirp:dev:     '/Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/src/flow-control/log-timings.js',
hello-twirp:dev:     '/Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/src/index.js',
hello-twirp:dev:     '/Users/huynhdung/Projects/research/grpc-demo-monorepo/node_modules/concurrently/dist/bin/concurrently.js'
hello-twirp:dev:   ]
hello-twirp:dev: }
hello-twirp:dev: 
hello-twirp:dev: Node.js v20.16.0
error Command failed with exit code 1.

How to reproduce:

gustavohenke commented 2 months ago

Hey, I haven't debugged this issue but I'm replacing date-fns with a custom solution in 710ee55e8ca25192e14203e2738a1b5178da75ea. This will solve your issue when the new version is released/you upgrade.

jellydn commented 2 months ago

Great. Thanks. It works now after upgraded to v9 :clap: