Codespaces (online.visualstudio.com) - Cannot find module 'tslint/lib/tsLintCli.js' - reactjs

I am developing on Codespaces (online.visualstudio.com) but got an error as below. Note: I've removed node_modules and npm install again a few time but doesn't resolve...also it worked OK in my local environment...my problem is I dont know how to fix it on Codespaces. Does everyone help me an advice?
node: v12.16.3
npm: 6.14.4
Running Linter
failed: Error: Cannot find module 'tslint/lib/tsLintCli.js'
Require stack:
/home/codespace/workspace/
/home/codespace/workspace

Related

React Module not found

I have installed an npm package on my react application but everytime I try to compile I get this error:
Module not found: Error: Can't resolve 'serialport' in 'C:\Users\Username\Desktop\ProjectGroup\c-test\src'
I have checked the node_modules folder and it is in fact in that folder.
i have also tried to install it again but it still throws the same error.
How would I go about fixing this?
As shown in comments, you installed only the types which are usefull for TypeScript.
Run npm i serialport

create-react-app error while using yarn 3

I'm using yarn 3.2.0(latest) and node 17.6.0(latest)
As instructed in CRA documentation I ran yarn create react-app myapp. It completed installation and was able to start the app using yarn start. However after making changes to the App , I always get the following error
ERROR
Failed to load config "react-app" to extend from.
Referenced from: D:\myapp\package.json
If I install any packages, I get module not found error like below
ERROR in ./src/App.js 6:0-39
Module not found: Error: Can't resolve 'styled-components' in 'D:\myapp\src'
Anyone know what's going on?
I had a similar issue. And found that the reason why this was happening to me was due to my Antivirus. Try disabling your antivirus on windows if you have one and re-create your project and if that fixes your issue.

React or NPM issue?

Good Evening All! Hope today was great coding day for everyone. Quick question..
After running the “npx create-react-app” command I get the following error message in my terminal
Cannot find module ‘./internal/Observable’ Require stack:
/Users/FInnocent/node_modules/rxjs/index.js
/Users/FInnocent/node_modules/inquirer/lib/ui/prompt.js
/Users/FInnocent/node_modules/inquirer/lib/inquirer.js
/Users/FInnocent/node_modules/create-react-app/createReactApp.js
/Users/FInnocent/node_modules/create-react-app/index.js
I’m running version v12.16.2 of node and 6.14.4 of npm.
I’ve tried searching for this error in StackOverlow but no luck. I also tried to install this module by running
npm install ./internal/Observable” and get the following error:
npm ERR! Could not install from “internal/Observable” as it does not contain a package.json file.
Any ideas on what’s wrong and how I can fix it?
Found a solution actually, I ran the following
npm install rxjs
And i’m all set now

Failed to compile chalk.js in react project

I've been having this issue with chalk.js since yesterday when I deleted the node_modules folder and reinstalled it again, now I'm using yarn and here's what I'm getting:
Failed to compile.
./node_modules/chalk/index.js
Module not found: Can't resolve '/home/rgomez/odlirApp/node_modules/babel-preset-react-app/node_modules/#babel/runtime/helpers/createForOfIteratorHelper' in '/home/rgomez/odlirApp/node_modules/chalk'
Does anybody have an idea why this could be happening?

React app 'Failed to compile' because './node_modules/jss-default-unit/lib/index.js' not found

I've just updated some Node modules in a React react project, but now when I go to localhost:3000 I get a Failed to compile error because ./node_modules/jss-default-unit/lib/index.js was not found:
The packages I've upgraded are Material UI and react-scripts, as seen from a git diff of package.json:
How can I resolve this issue?
(This issue, https://github.com/cssinjs/react-jss/issues/146, describes a similar issue caused by Babel running on node_modules, but I wasn't able to find a webpack.config.js in node_modules/babel-loader to modify).
I resolved this by running npm install jss-default-unit and restarting the server with npm start.

Resources