Cannot find module '@rometools/cli-linux-x64/rome #4307
-
I've added rome as a dev dependecy to my project and running it locally with Running the same in a Github Action however failed with: node:internal/modules/cjs/loader:1078
throw err;
^
Error: Cannot find module '@rometools/cli-linux-x64/rome'
Require stack:
- /home/runner/work/hw2energyid/hw2energyid/node_modules/rome/bin/rome
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Function.resolve (node:internal/modules/cjs/helpers:116:1[9](https://github.com/Th3S4mur41/hw2energyid/actions/runs/4451093973/jobs/7817331631#step:5:10))
at Object.<anonymous> (/home/runner/work/hw2energyid/hw2energyid/node_modules/rome/bin/rome:22:11)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:[10](https://github.com/Th3S4mur41/hw2energyid/actions/runs/4451093973/jobs/7817331631#step:5:11))
at Module.load (node:internal/modules/cjs/loader:[11](https://github.com/Th3S4mur41/hw2energyid/actions/runs/4451093973/jobs/7817331631#step:5:12)17:32)
at Module._load (node:internal/modules/cjs/loader:958:[12](https://github.com/Th3S4mur41/hw2energyid/actions/runs/4451093973/jobs/7817331631#step:5:13))
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:[23](https://github.com/Th3S4mur41/hw2energyid/actions/runs/4451093973/jobs/7817331631#step:5:24):47 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/hw2energyid/hw2energyid/node_modules/rome/bin/rome'
]
} The reason was that on ci, I didn't install optional dependencies for performance reasons:
Changing this to no longer skip optional dependencies fixed the issue and rome is now also running fine on the CI
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, this is intentional. If you know your architecture and OS, you should install it together with the |
Beta Was this translation helpful? Give feedback.
Yes, this is intentional. If you know your architecture and OS, you should install it together with the
rome
package as adependency
. In your casenpm install @rometools/cli-linux-x64
should fix your issue.