I have a create-react-app
app and I am translation files from jsx
to typescript
. For example, one file is called /code/app_react/src/common/Action.jsx
and I renamed it to /code/app_react/src/common/Action.tsx
. I made the necessary changes to successfully convert it to tsx
, but I am getting an error related to the name change:
./src/common/Action.jsx Error: ENOENT: no such file or directory, open '/code/src/common/Action.jsx'
The file importing this file is a jsx
file, but now I am importing a tsx
file into it.
This is a CRA app, so is there a correct way to clear this error?
SOLUTION: I had to remove them from the git
repository, using the git rm
command, like this:
git rm /code/src/common/Action.jsx
Once I did that, it removed the jsx
from the committed files and then I was able to use the new tsx
files
It's an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories. It's abbreviated because C compilers at the dawn of time didn't support more than 8 characters in symbols. Follow this answer to receive notifications. edited Jun 4, 2019 at 14:30. community wiki.
Killed my yarn process running, killed vscode, re-started both and it works
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