I get an error when trying to install strapi node v18 - reactjs

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.

Related

Failed to Compile Error on npm run start - CRA - Need a solution without reinstalling NODE

I have a project bootstrapped using Create React App (CRA) with templates provided by ReactStrap Library. The trouble is in my windows system with the exact same node version npm run start works well but on my Macbook pro it failed with error: See below errors details:
Failed to compile.
./src/styles/reduction.scss (./node_modules/css-loader??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/lib/loader.js??ref--6-oneOf-5-3!./src/styles/reduction.scss) Error: Missing binding /Users/ganesh/Desktop/Juego Projects/2.4 Dream Ludo/0.0 Sourcecode/manojshetty-server-dreamludo/dream-ludo-cms/node_modules/node-sass/vendor/darwin-x64-72/binding.node Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 12.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 10.x
This usually happens because your environment has changed since running npm install. Run npm rebuild node-sass to download the binding for your current environment.
Below are the things that i tried.
The way i got it working is with uninstalling NODE and installing an older version.
But i cant keep doing it all the time.
Any solutions? I intend to check this further tonight but for now having to work with multiple codebases doesnt really help in having to install 1 node version at a time. it is also time consuming.
This happened with me too in the past. Heres what i had done to get it resolved. see if it works for you.
The thing is you need multiple versions of node running in the same machine with option to switch or mark 1 as default while having others too.
The best option for this is to install NVM See this LINK!
once done, you go to the root of your project. Better start clean. So remove the existing node_modules folder(and its subfolders), Remove the package-lock.json
now change to node version 10 by doing nvm use 10 (it will tell you if you dont have node 10 installed, follow the on screen steps)
now do npm install followed by running the project. This should work now.
Once you are done, and want to run another project. Go to the root of that project and then do the same nvm use then run the project.
good luck

Can't activate the expo manifest tools on Visual Studio Code

So I am currently trying to learn React and code on Visual Studio. Now, I am getting errors saying:
Oops, it looks like we couldn't activate the Expo manifest tools: Unable to perform cache refresh for C:\Users\Jasun\AppData\Local\Expo\schema-43.0.0.json: Error: certificate has expired.
Does anyone have any ideas?
Current versions are:
git version 2.34.1.windows.1
node version 17.2.0
expo version 5.0.0
Visual Studio Version 1.63.0
yarn version 1.22.17
reinstall doesn't help for now...
here is the workaround before they fix the issue - "Certificate has expired" when activating the Expo schema
You may try the workaround derived from the issue description
> expo init temp-proj --template expo-template-blank#44
> cd temp-proj
> expo doctor
Once expo doctor executed, the schema-44.0.0.json appear in %AppData%\Local\Expo\schema-44.0.0.json
then you can delete the temp-proj...
Warning: Problem validating app.json: Unable to perform cache refresh for ***C:\Users\Admin\AppData\Local\Expo***schema-44.0.0.json: Error: connect ETIMEDOUT 34.132.55.135:443.
Find schema-xx-x-x.json in C:\Users\Admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\caches
or search with everything app in your PC
Paste on C:\Users\Admin\AppData\Local\Expo\
Tadaaa Work
updating your expo cli will fix the issue
npm install -g expo-cli
then check the new version
expo --version
OR
use this link description
I had the same issue. The problem occurs because the file schema-43.0.0.json is missing from the directory.
I fixed it by copying one of the other schemas and renaming it to the missing one.

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

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

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

mauron85 background-geolocation installation issues (react-native: command not found)

hope you can help. I'm trying to install mauron85 react-native-background-geolocation and when i go to link the dependencies (react-native link react-native-mauron85-background-geolocation) i keep getting 'react-native: command not found'. i've installed npm, nodejs, react native (npm install -g react-native-cli), flow, watchman and the mauron85 package. i'm running this on ubuntu and have tried on mac and getting the same error message on both. I've also tried doing the manual setup for android and this hasn't worked because I don't have some of the node modules it needs, and have tried adding the right path to my path variable, which has made no difference. Is there anything obvious I'm missing that I've forgotten to install/has anyone had a similar message before?
Thanks!

Resources