NPM Error: EPERM: operation not permitted. Tarball data for <package> seems to be corrupted - npm

I've been trying to create a new angular app with the cli, but I keep getting this error.
At first I thought it was something related to the version of cli I had installed( the latest one), so I uninstalled it and tried with the same version(6.0.8) that is used in the course I'm following along, but I get the same error :
Do you have any idea how I can figure out what is causing this issue?
Is there any log I can check?
I'm using :
Node: v8.11.3
Npm: 6.4.1
Windows 10 Pro.

I resolved it using this command:
npm install --registry https://registry.cnpmjs.org

Related

Error while I create a new Npm project it says error while installing dependencies

enter image description here
While creating a npm project I am getting this error.
But when I install yarn.
I don't know how to rerun the program.
Or is it because I installation problem.
Is using the latest version of node an issue.
Can Someone help me with this?
the strapi supports node version up to 18, you can check it here https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/installation/cli.html#preparing-the-installation
there is flag for npm you can try to use:
npx create-strapi-app /appname --ignore-engines
However I doubt it would work, the workflow with yarn:
yarn create strapi-app /appname
If error still persists you can try to open your project with VS code or whatever IDE you use… Open terminal, do:
yarn --ignore-engines
yarn build --ignore-engines
yarn develop --ignore-engines
If that won’t help, it should give you another, more detailed error message that you should post then here…

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 "Cannot read property "matches" of undefined" when using "npm install"

I'm trying to install expo globally on my Windows 10 machine for a school assignement.
As the doc says, I've been trying the following command in my terminal :
$ npm install --global expo-cli
but it always gives me the same error :
npm ERR! Cannot read property 'matches' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2021-04-07T13_43_16_562Z-debug.log
I've tried running $ npm install -g expo-cli instead but the same thing happens.
I haven't tried reinstalling node or anything yet because I need my pc up and running for this week and I'm not too accustomed to all that, I'd like to keep that a last resort if possible.
Has anyone ever encountered this error before ?
Thanks to those who replied but I "accidentally" fixed it myself.
Through my searching I ended up actually uninstalling node with $ nvm uninstall v15.0.0 and I found myself obligated to download it again here.
Must've been a problem with the version I was using as suggested before.
Try removing the node_modules folder and package-lock.json file and run command npm install.

angular-cli keeps throwing Error: Cannot find module 'source-map'

So I installed the angular-cli using npm install #angular-devkit/build-angular but every time I try and use the ng command I get this error: Error: Cannot find module 'source-map'
even trying ng version throws the error. I also trying installing it using npm install angualt-cli but that didnt work either. Anyone know how to fix this issue?
I tried a lot of things and ended up just giving up and running npm install source-map which solved it for me.

Stencil Paper.loadTranslations Error

When trying to run Stencil I am receiving the error below.
Debug: internal, implementation, error
TypeError: Uncaught error: self.assembler.getTranslations is not a function
at Paper.loadTranslations (/user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/#bigcommerce/stencil-paper/index.js:137:20)
at /user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/#bigcommerce/stencil-paper/index.js:62:18
at /user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:718:13
at async.forEachOf.async.eachOf (/user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:233:13)
at _parallel (/user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:717:9)
at Object.async.parallel (/user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:731:9)
at Paper.loadTheme (/user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/#bigcommerce/stencil-paper/index.js:60:11)
at respond (/user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/server/plugins/renderer/responses/pencil-response.js:29:15)
at /user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:49:18
at /user/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:246:24
My setup is as follows:
MacOS 10.11.5
NVM 0.31.0
Node 4.4.0
Stencil 1.3.5
I have tried a fresh install of NVM and Node by first uninstalling NVM and following the guide at https://stencil.bigcommerce.com/docs/installing-and-launching-stencil-1 end to end. This has not resolved the error and I cannot run stencil.
Has anyone else encountered this issue or have a solution?
If you pull down the latest version of Stencil (just deployed in the last couple hours), you should have a fix for this. It was an issue introduced in a previous (recent) release.
npm install -g bigcommerce/stencil-cli
That should pull the update.