I'm running yarn in a project created with create-react-app, but I'm getting this error:
Exit code: 1
Command: start /B node compile.js & node compile.js
Arguments:
Directory: uber-web/node_modules/coa
Output:
/bin/sh: 1: start: not found
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'uber-web/node_modules/coa/compile.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
I've already uninstalled all the .lock and node_module folder, but it still doesn't work.
If you are getting the "Cannot find module" error when trying to run a local file, make sure that the path you passed to the node command points to a file that exists. For example, if you run node src/index. js , make sure that the path src/index. js points to an existing file.
To solve the error "Cannot find module 'express'", install the package by running the command npm install express in the root directory of your project. If you don't have a package. json file, create one by running npm init -y . The error occurs when we try to import the express package without installing it.
The problem is being addressed on the Github page of the coa package: https://github.com/veged/coa/issues/99
An attacker published a corrupted version of the package, do not install it especially if you are on Windows !
Update: NPM removed the malicious version and the latest version is 2.0.2 again. Everything should be back to normal.
As mentioned in the previous answer. It is due to a new release that is broken and malicious (confirmed).
As mentioned in https://github.com/veged/coa/issues/99:
Short-term fix š¤ Use "[email protected]" specifically. 2.0.3. is the first update that broke things. š¤
Additionally as @herrwitzi suggests in the comments if you use yarn you can add a resolution to your package.json
"resolutions": { "coa": "2.0.2" },
Just add above line under your dependencies in package.json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With