Failed at the grpc#1.20.0 install script. while installing react - reactjs

I am having a hard time installing React Theme. The problem is when I downloaded the theme and extracted it and went to the root directory...then tried to install it by running this command npm install.
it gave this error
Failed at the grpc#1.20.0 install script.
the error log was like this:

After whole hours I find a hint from Github saying the problem was installing firebase which basically has grpc in them.
So what I did was to disable the antivirus or windows defender, whatever you have in your pc, and boom it will install safely.
this was the link I referred to https://github.com/grpc/grpc-node/issues/121

Related

I get an error when trying to install strapi node v18

Image with ERROR!!!
When trying to install strapi with npx create-strapi-app#latest my-project
, an error appears. Everything used to work fine, now it doesn't want to install. In general, I can not solve the problem anywhere. Also tried reinstalling Python, node, sqlite3, gyp and nothing helped. Here is the error code ( it works with node v16 but i need 18 ;/ )
I'm on macbook m1 with node 18.12.1. I can do this without any issue.
I'm not 100% sure what is the problem but the error messages are saying that when it was trying to install the "better-sqlite3". It couldn't find the prebuilt package (warn install No prebuilt binaries found) that fit your system so the installer tried to build the package by itself (better-sqlite3#7.4.6 build-release) but turns out still you can't meet the requirement it needed (missing any Windows SDK).
Try to install Windows SDK on your computer. I think I would fix the issue.

Azure pipeline "npm install" but package doesn't exist anymore

When building my project in Azure pipeline, there is a step that does npm install.
However one of the package it requires doesn't seem to exist anymore on NPM. What are my options now?
8412 error code E404
8413 error 404 Not Found - GET https://registry.npmjs.org/angular-appinsights/-/angular-appinsights-0.0.4.tgz
8414 error 404
8415 error 404 'angular-appinsights#0.0.4' is not in the npm registry.
8416 error 404 You should bug the author to publish it (or use the name yourself!)
Edit I have added this package privately to Azure Artifact feed, and all other NPM packages (not privately) as well, would this mean that if in the future someone removes there package from NPM I would still have the (artifact feed) as backup?
Caution: this might not be the best practice
I had a similar issue with some legacy app that was built upon the beta of Material UI. When putting the application on a CI/CD pipeline what we had to do was before launching npm install have a script move the node_modules folder to where the application was being built and then launch npm run build because in this case it was a React App (I'm guessing it is similar for Angular).
What I would suggest is that you have a copy of that package from the node_modules folder copied into a node_modules folder while deploying before running npm install because npm won't install packages it finds are already there.
Of course best practice would be to update that package but I'm guessing that is not up to you. If you could, I would suggest you ask the developers to review the dependencies or to tell you how they deploy that application locally because, from the little research I've done it seems to me that there other up-to-date packages available. They might have installed the newest package but forgotten to remove the old one and since they have never had to redeploy simply didn't stumble upon that error, other possibility is they're passing the node_modules folder around.

Encounter errors when create react project

When I try to run npm create-react-app <name>, I encounter error reports. I've tried updating my node.js/npm and several other things and just don't work.
as you see in the error message, you have to install the last version of Visual Studio, take a look at node-gyp README, there is a guide to install and configure the dependencies.
suggest: use the npx to initialize a new react project with CRA, this way you will install the latest version each time.

Install sharp without GitHub fetch for Nextjs: Error: Cannot find module 'sharp'

I'm trying to use Next.js on my corporate system, but whenever I run "npm run build", the build fails with the message: Error: Cannot find module 'sharp'
I tried installing sharp but I get this error:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-win32-x64.tar.br
ERR! sharp getaddrinfo ENOTFOUND github.com
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
This is probably because github URLs are blocked on my system's terminal due to security reasons. Is there a way to install sharp without fetching from github? I can access GitHub on the browser, so if downloading the file from there and then installing it somehow is possible I can do that.
OS: Windows 10
UPDATE: NextJS v10.0.8 fixes this issue! If you're running into the above error: upgrade to the 10.0.8 (or beyond).
The required sharp dependency introduced with NextJS 10.0.5 has broken builds that depend on the underlying libvips, which isn't there in various Linux distros. They're working on making the dependency optional. Relevant PR here and here. Related issue here. This may be easier than trying to get libvips installed or compiled on your machine (I simply couldn't get it to work on my Amazon EC2 ARM-based machine). You can downgrade to NextJS 10.0.3 in the meantime. I think they'll fix it soon.
I had the same error. It was happening to me because I have the Apple M1 Mac. I solved the error installing Homebrew, and after that, I had to install 'lipvips' using Brew install vips. Then, inside my project, npm install sharp, and finally, I run npm run build and it worked fine for me. I Hope It works for you!
I had the same problem on mac m1. I downgraded node version to 14 and now it works

"gatsby-plugin-sharp" plugin Couldn't be found when gatsby develop command is ran

Got a new pc and cloned my project from GitHub, then run npm install but then it installed with lots of errors, so now I ran gatsby develop and got the error messages below. please assist me
ERROR #10226 CONFIG
Couldn't find the "gatsby-plugin-sharp" plugin declared in "C:\Users\Administrator\Desktop\Projects\IamJude\gatsby-config.js".
Tried looking for a local plugin in C:\Users\Administrator\Desktop\Projects\IamJude\plugins\gatsby-plugin-sharp.
Tried looking for an installed package in the following paths:
C:\Users\Administrator\Desktop\Projects\IamJude\node_modules\gatsby\dist\bootstrap\load-themes\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\Desktop\Projects\IamJude\node_modules\gatsby\dist\bootstrap\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\Desktop\Projects\IamJude\node_modules\gatsby\dist\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\Desktop\Projects\IamJude\node_modules\gatsby\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\Desktop\Projects\IamJude\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\Desktop\Projects\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\Desktop\node_modules\gatsby-plugin-sharp
C:\Users\Administrator\node_modules\gatsby-plugin-sharp
C:\Users\node_modules\gatsby-plugin-sharp
C:\node_modules\gatsby-plugin-sharp
not finished open and validate gatsby-configs - 1.329s
ERROR
The above error occurred in the component:
in CLI (created by ConnectedCLI)
in ConnectedCLI
in StoreStateProvider
in App
React will try to recreate this component tree from scratch using the error boundary you provided, App.
ERROR
Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.
C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
TypeError: Cannot read property 'activities' of undefined
at getGlobalStatus (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\lib\reporter\redux\utils.js:25:54)
at createPendingActivity (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\lib\reporter\redux\internal-actions.js:114:51)
at C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\redux\lib\redux.js:483:35
at prematureEnd (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\lib\reporter\catch-exit-signals.js:39:38)
at Reporter.panic (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\lib\reporter\reporter.js:72:42)
at process. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\lib\index.js:79:21)
at process.emit (events.js:327:22)
at processEmit (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\signal-exit\index.js:161:32)
at process.emit (C:\Users\Administrator\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules#turist\fetch\dist\sourcemap-register.js:926:21)
at processEmit [as emit] (C:\Users\Administrator\Desktop\Projects\IamJude\node_modules\gatsby\node_modules\gatsby-cli\node_modules\signal-exit\index.js:161:32)
at processPromiseRejections (internal/process/promises.js:209:33)
at processTicksAndRejections (internal/process/task_queues.js:98:32)
What is the contents of your package.json?
Do you having gatsby-plugin-sharp installed?
Maybe try npm install --save gatsby-plugin-sharp
In Windows, you may need to make add a few extra packages to make the project run. First of all, I will try to add manually the gatsby-plugin-sharp by:
npm install --save gatsby-plugin-sharp
If the error persists, you may need to add windows-build-tools as you can see in the Gatsby on Windows documentation:
npm install --global windows-build-tools --vs2015
The command above, upon installing this package, it downloads and installs Visual C++ Build Tools 2015, provided free of charge by Microsoft. These tools are required to compile popular native modules. It will also install Python 2.7, configuring your machine and npm appropriately.
If your windows-build-tools installation stalls after Visual Studio Build Tools finishes, this remedy might help.

Resources