create-react-app: Invalid tar header issue on create new app - npm

For some reason, I keep getting "invalid tar" error (image below).
This script used to work in the past. But as I am about to start a new project, it fails.
Here the solution that I've tried and it not working.
Delete my node_modules folder
Reinstall Nodejs and npm
Delete npmrc file in AppData\Roaming\npm\etc\npmrc

try and update the create-react-app package using the npm .
delete test project files any if created due to previous command.
run the create-react-app command again with a proper internet connection and it should work.

Related

What causes the npm error {errno: -4094, code: 'UNKNOWN', syscall: 'readlink'}?

I have been happily building a next.js app over the last couple days without error. Today I installed the firebase npm and suddenly I am getting a strange error when I try to run "npm run dev?
ready - started server on 0.0.0.0:3002, url: http://localhost:3002
[Error: UNKNOWN: unknown error, readlink 'C:\...\seo-site\.next\server\pages\_document.js'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'readlink',
path: 'C:\\...\\seo-site\\.next\\server\\pages\\_document.js'
}
Even if I uninstall firebase and roll the entire project back to a working build I still get the same error. If I try to run this "broken" build on another computer with the same version of node and npm it runs completely fine. I've tried running npm cache clean --force and npm install -g npm#latest --force several times without any luck.
I have noticed that as I change things I get the error with a different path. Sometimes it's \webpack-runtime.js sometimes its \errors.js and somethimes it's \pages\_document.js'
I cant find anything online or on stack overflow for an error matching this errno or syscall. Has anyone experienced this before or know what is causing this?
deleting the .next file and running npm run dev fixed the issue. I am not sure why this worked but I think it has something to do with next.js trying to use parts of a previous build when you make updates that are causing errors. deleting folder forces next to rebuild everything again.
I tried to go back directories from command line and then reentered into the workplace directory and tried npm run dev. Worked for me.
Right-click the project folder and from the menu choose "Open in integrated Terminal". Then try to run "npm run dev". If it still doesn't work, go back one folder with the command "cd .." and then go back again to the project folder with "cd project folder name". Try running "npm run dev". It worked for me on both occasions. Hope this helps.
Solved by restarting VS Code 🤔
Error occurred seemingly out of nowhere, when restarting the local server with 'npm run dev'. Just doing minor CSS changes to a component in the Nextjs project.

"Error: EEXIST: file already exists" when running starter command for Remix.run

I've never been really familiar with the npx command but from my understanding it's just a way of executing NPM packages, which is required in the Getting started guide from Remix.run web framework.
It's really frustrating to just get stuck on the first step when I simply have to execute the npx create-remix#latest command. I get the following error:
Error: EEXIST: file already exists, mkdir 'C:\Users\Ruben'
command not found: create-remix
Not sure what happens underlying but I don't know why it's trying to create a folder in the C drive when I execute this on D:\Github\new-project
NPM/NPX version: 6.14.6
This seems to be a problem with your node/npm configuration rather then remix.run.
.npmrc file at C:\Users\Ruben
Do you have a .npmrc file? Maybe try and delete it as this answer details.
If you Google for "npx eexist file already exists", you will find several threads with the same issue and it seems to be a node/npm installation/configuration issue: 1, 2

nodemodule not found file or directory

When I remove some extra files in my project i found an error. It create a much of errors
in my project
Following picture is showing as
I did't have any idea to solve it help me to solve the issue.
You removed the file "CustomerList.vue" but you are importing it from another place. Just remove the import.
Delete node-modules folder.
run command npm cache clean --force.
run command npm install.
Finally install the package again with npm install your-package-name.

expo is not recognized as an internal or external command

I am having trouble getting expo start to work.
I completely uninstalled both expo and expo-cli with npm and yarn and then installed expo-cli globally with npm and I still get the same error. I think it has something to do with the most recent expo-cli update, because it was working perfectly fine. So how can I install an older version of expo-cli?
I also don't see any path in the environment variables? Could that have something to do it?
For some reason, the update messed with the path.
So I had to go to edit environment variables and add another line to the variable "Path" under the system variables.
Don't hit new. Click on "Path" under the system variables section and add a new line there. and use "%USERPROFILE%\AppData\Roaming\npm".
Then open a new command line and it should work.

Error when installing react-native-keyboard-aware-scroll-view in command prompt

So I want to install react-native-keyboard-aware-scroll-view because <ScrollView></ScrollView> with <KeyboardAvoidingView></KeyboardAvoidingView> has some bug. But in my case, when I install it in command prompt and reloading my app it gives me error.
Source: https://github.com/APSL/react-native-keyboard-aware-scroll-view
This is the error in my app:
This is the error in my command prompt when installing it:
I have had this issue multiple times only in Windows I try these in the order usually.
npm install --force
Check if node_modules is set to read-only and remove if it is
Delete node_modules/
Check if any editor is opened that could have access to the root folder of the project
Reboot :(
Usually trying npm install after one of those steps will resolve it.
If these doesn't solve the issue, comment this solution and I will provide you with other solutions.
Because, this issue will also occur due to node installation error caused by your system antivirus.