So I'm a beginner with Sanity.IO and what happened was when I first created my first project everything went perfect, but I accidently deleted some important files in my VS-code which crashed my site which forced me to start over but now
sanity init
is not starting a new project. This is the error I'm receiving:
`
You're setting up a Sanity.io project!
We'll make sure you're logged in with Sanity.io.
Then, we'll install a Sanity Studio for your project.
Press ctrl + C at any time to quit.
Looks like you already have a Sanity-account. Sweet!
Error: Failed to communicate with the Sanity API:
read ECONNRESET
at C:/Users/xxx/AppData/Roaming/npm/node_modules/#sanity/cli/bin/sanity-cli.js:4860:4515
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async e.default (C:/Users/xxx/AppData/Roaming/npm/node_modules/#sanity/cli/bin/sanity-cli.js:4860:4
`
I have deleted my project from Sanity.IO studio but still I'm receiving the same error.
I have tried the following steps:
npm install -g #sanity/cli
sanity init
I get the same error.
npm install -g #sanity/cli
sanity install
sanity init
I get the same error.
I have also tried
npx install --global #sanity/cli
npx #sanity/cli init
I get the same error. I can't create a project.
Also if I try sanity logout it gives me error:
Failed to communicate with the Sanity API:
read ECONNRESET
I looking at every google link to find any solution but I have not.
Related
I am using react native and Expo. I am unable to build new app because after I use expo init appName it shows the following error.
Heres the full message:
📦 Using npm to install packages. You can pass --yarn to use Yarn instead.
√ Downloaded and extracted project files.
× Something when wrong installing JavaScript dependencies. Check your npm logs. Continuing to initialize the app.
✅ Your project is ready!
To run your project, navigate to the directory and run one of the following npm commands.
- cd Scanner
- npm start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- npm run android
- npm run ios # requires an iOS device or macOS for access to an iOS simulator
- npm run web
I tried multiple times to create a blank project, also tried npm install to install failed/not downloaded libraries and continue after failure but it showed another error:
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file
also tried npm cache verify that showed cache is ok Content verified: 3562 (252580364 bytes).
So, How can I solve this issue?
Problems related to npm installation are very common If you do any mistake in early installation, but is avoided. Learn more about npm tree.
Steps worked for me are :
npm cache clean --force
npm cache verify
npm -g uninstall expo-cli --save
npm install expo-cli --global
expo init app-name
cd app-name
npm start
Always run as administrator if working on Windows and in root directory.
The solutions above didn't work for me but if you use 'npm install' in the directory of the app you get a clue that you shuold try 'npm install --force'
err message
You should have all these files folders and files at the start of the project otherwise not all the dependencies have been installed which is why we were getting the problem.folder structure
After you have added --force to npm install you have all the dependencies installed. Now you can run the app with npm start.
Unfortunately, all the solutions described above didn't work on my machine...
Here is my latest solution for this problem...
This worked 100% on my machine...
Use npm i -g expo-cli
This will automatically add the required packages and also remove the unnecessary ones.
Yes, surely, you don't need to uninstall and re-install it again.
Just follow my steps.
And, you can create your expo project using expo init.
I hope my solution will help you out from this annoying problem....
I just did npm install and it worked for me, but I had do that every time I create a new expo project.
I also encountered this problem, and finally found that it was the problem of react native cli,I installed the latest version of react native cli,Expo is back to normal
This Error is regarding to the git account. expos need a git account to setup react native project
If you are using windows you need to install git in your local PC
after that open your Terminal and type this command
git config --global user.name "your_username"
git config --global user.email "your_email_address#example.com"
after that clone any github project to your local computer. it will ask to login to Github
after all these steps try expo init <projectname>
The simple way to settle that error is by using "expo-cli init app-name" instead of "expo init app-name".
I tried and worked perfectly for me. Hope it will help you guys.
i have faced a similar problem and running yarn set version 1.22.1 fix it
Run the Command Prompt as an administrator. And run the following command:
npx create-expo-app AwesomeProject
I have deployed Firebase functions in the past many times. For some reasons, recently (around 2-3 days) I am frequently getting error while deployment. I am using windows to release the code. When I tried with setting up the same project in my Linux system and Mac system the deployment works correctly. What may be the issue for the release from Windows environment.
The following is the issues getting while deployment.
! functions[payment(us-central1)]: Deployment error.
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
Functions deploy had errors with the following functions:
admin
cancellation
cost
createStripeCharge
customer
driver
driverLiveTracking
generalSettings
notification
order
payment
To try redeploying those functions, run:
firebase deploy --only "functions:admin,functions:cancellation,functions:cost,functions:createStripeCharge,functions:customer,functions:driver,functions:driverLiveTracking,functions:generalSettings,functions:notification,functions:order,functions:payment"
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
Following is the deployment command I am using for
"echo Deploying Functions && npm run lint && npm run build && firebase deploy --only functions"
Please share your knowledge over the issue.
Thanks.
I have resolved this issue. On building, I found that the node modules and lib functions are not replacing correctly with the new build. I have done a name changing previously and that are not reflecting in the new build.
Steps followed:
Removed node modules and lib files
Npm install
Npm run serve
And a new build is worked fine as well. I got the same issue using Jenkins build also. I just manually removed the same in server also.
You can find the issue by examining the actual logs. view them using this command
firebase functions:log
The specific issue will be visible there. I sometimes had error as simple as a missing packages in package.json
Hi wonderful people of stackoverflow!
Background
I have an Angular 9 application and CI set up with Codeship. This has been running fine until about two weeks ago when suddenly it stopped working after I upgraded from Angular 7.
Set up commands:
nvm ls
nvm install v10.15.1
nvm use v10.15.1
gem install rb-inotify -v 0.9.10
gem install sass
npm install -g firebase-tools#6.12.0
npm i firebase-functions#3.3.0
yes | npm install -g #angular/cli#9.1.12
npm i
cd functions
nvm use v10.15.1
npm i
cd ..
Which runs as expected. I have checked the versions in the CI environment with npm outdated, which show me that the correct versions are being installed the same as local:
Deploy script:
firebase use default
firebase functions:config:set test="test" --token "$FIREBASE_TOKEN"
firebase deploy --token "$FIREBASE_TOKEN"
Error:
firebase use default is successful, but firebase functions:config:set test="test" --token "$FIREBASE_TOKEN" now returns:
Error: HTTP Error: 404, Method not found.
Notes:
I've reset up the $FIREBASE_TOKEN with the new cli and can confirm that this probably isn't the issue, because when the token is incorrect (I removed the last character from the TOKEN), it throws a different error stating this.
I can also confirm that the same script run locally works and deploys just fine - so while I can get around the problem this way, it isn't an ideal or long term solution.
Any ideas or help would be genuinely appreciated as I'm somewhat lost as to what to do next?
This seems to be related with firebase-tools version. When I installed the same version as you have (6.12.0) I got the same error.
I have tried on new version (I have 8.7.0) and it is working fine with one more remark. When I tried exactly the same command as you have error:
Error: Invalid argument, each config value must have a 2-part key (e.g. foo.bar).
So working command will be like this:
firebase functions:config:set test.test="test"
If you need old version of firebase-tools I tested few other versions and it seems that this is working since version 7.1.0.
For anyone else having this issue - I never managed to solved this sorry. However I migrated my CI over to use GitHub Actions easily and it all works without any issue.
When running a meteor.js app via meteor run --verbose android I get this error:
Failed to install 'cordova-plugin-whitelist':Cannot find plugin.xml
for plugin "cordova-plugin-whitelist". Please try adding it again.
I've tried the fix suggested here (installed cordova plugin via add cordova-plugin-whitelist in the folder .meteor/local/cordova-build) and this got the emulator started but then this error appeared:
Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
I found some information about this one on the issues gitHub site for meteor, but I'm at a loss now for what to do.
These errors (not surprisingly) also cause meteor-up deployment to fail. I
tried adding buildOptions: { "serverOnly": true } to the mup.json file per the mup docs but this failed to stop meteor from building the cordova architecture. Is there is a build setting or flag for mup deploy or meteor build so that it doesn't try to build the web.cordova architecture at all?
I'm getting this error when I try typing $modulus deploy into terminal from my app directory:
Determining Meteor version...
Meteor version: 1.1.0.2
Bundling Meteor App...
undefined
[Error] Error: Command failed: /bin/sh -c cd /Users/xx/Projects/Project1 && meteor bundle --directory /Users/xx/Projects/Project1/.demeteorized
This command has been deprecated in favor of 'meteor build', which allows you
to build for multiple platforms and outputs a directory instead of a single
tarball. See 'meteor help build'for more information.
WARNING: The output directory is under your source tree.
Errors prevented bundling:
While building the application:
client/Project1.js:138:29: Unexpected token =
I get the same result with $demeteorizer. It worked on an old version of the app, then I added some features in new branch, merged, and now I'm getting this error.
Already tried:
sudo npm update -g modulus
Turns out it was an actual error in my code. I had an extra closing curly brace somewhere.