React Native- Expo Something went wrong in downloading and extracting the project files: NPM package not found: - react-native

I have started many react native applications with the following code before, but now I am encountering this error (Something went wrong in downloading and extracting the project files: NPM package not found: https://registry.npmjs.org/expo-template-blank/-/expo-template-blank-47.0.19.tgz
Error cloning template: Error: NPM package not found: https://registry.npmjs.org/expo-template-blank/-/expo-template-blank-47.0.19.tgz).
Can anyone figure out why?
Error

Try this
npm uninstall -g expo-cli
and npm start again.

Related

Cannot find module ‘#expo/metro-config’ when trying to start the project with expo cli >= 4.8.0

I recently tried to launch my project on a new computer. I downloaded the source code from its repository and ran npm install to get all the needed packages.
However, when I run npm start or expo start:web, I get the error:
Cannot find module '#expo/metro-config'
I ran npm install #expo/metro-config and the install run without issue, but I still get the “Cannot find module '#expo/metro-config'” error.
The only post I saw regarding this error recommends editing the metro.config.js but I do not use one.
I am on SDK 42, and the project launches fine on my other computer. Any idea what is happening?
FYI, I use to perform this whole operation without any issue until now.
UPDATE:
I ran npm install -g #expo/metro-config and now I get the error Cannot find module 'resolve-from'
So it looks like maybe running npm install -g expo-cli doesn't actually install all the necessary packages? Could it be the issue?
I managed to make it "work" (get other missing packages errors down the line) by reverting to expo-cli 4.7.3. Anything from 4.8.0 and above will cause the error.
Something else is that on a fresh npm install, after running npm install -g expo-cli, if I try to create a project with expo init, I will get the error Error: Cannot find module 'kleur'. Running npm install kleur fix it, but maybe that's also a clue.

Error initialising the React Native awsomeProject via the CLI

I am trying to get the basic react native app from https://reactnative.dev/docs/environment-setup running via the CLI, but I am getting errors. I have node, python2 and jdk8 installed. I have all the Android Studio components installed as far as I can tell. I've added the environment variables.
When I run npx react-native init AwesomeProject to initialise the project, I get green ticks next to Downloading Template, Copying Template and Processing Template, but a red cross next to Installing dependencies. The error below that states Error: command failed: npm install. And further down after some warnings it states npm ERR! Unexpected end of JSON input while parsing near '...anbul":"0.4.5","mocha'
And in the initialised app folder there are no node modules.
Any idea how I get this working?
Hi the solution for this is to clear your cache :)
Please run the following command and retry:
npm cache clean --force

npm cannot install some packages globally and locally?

I'm developing some JavaScript application with VSCode editor, and it says cannot find ESlint package. So i tried install it locally on app directory and globally, but both methods are failed. It gives following error(log file) and stops installation.
silly fetchPackageMetaData error for emoji-regex#^7.0.1 Unexpected end of JSON input while parsing near '...gex-7.0.1.tgz","fileC'
i tried to install package that causes the error and it also get failed, i cleared cache of npm with npm cache clean --force and re-install eslint package. And it worked.

vue ui Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'

I'm starting to learn Vue.js but when I try to launch vue ui, I get this error:
Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'
I tried to npm install -g core-js and yet still the same error.
my npm version is 6.4.1
Thanks for your anwsers
Here's a temp workaround while they work on resolving the underlying issue:
npm install -g core-js#3.0.0-beta.11
That temp resolution comes from this GitHub issue:
https://github.com/vuejs/vue-cli/issues/3406#issuecomment-459956718

Module not found: Error: Can't resolve 'ode_modulesue-loaderlibcomponent-normalizer'

I've recently decided to give vue-cli a go but after I run npm install, running npm run dev gives me the following error.
Module not found: Error: Can't resolve 'D:Projects estapp
ode_modulesue-loaderlibcomponent-normalizer' in 'D:\Projects\testapp\src'
Any ideas?
Thanks
I was able to fix this error by reinstalling previous version.
npm install vue-loader#10.0.0 --save-dev