Strapi - Server wasn't able to start properly - mongodb

I'm building app in Flutter. I have connected Strapi with Mongodb Atlas.
Everything was fine until suddenly I'm getting this kind of error:
[2020-08-03T17:03:26.651Z] debug ⛔️ Server wasn't able to start properly.
[2020-08-03T17:03:26.652Z] error Error connecting to the Mongo database. Server selection timed out
after 30000 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server#0.1.0 develop: `strapi develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server#0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
My cluster is connected and I know no idea what could go wrong.
Any idea what should I do?

Apparently my ip has changed. So what i had to do is to add in mongodb atlas my new ip.
In my Cluster -> SECURITY -> Netwrok Access - ADD IP ADDRESS.
And thats its

Related

Error running npx playwright codegen in VScode without internet access

Im getting the following error when running running npx playwright codegen in VScode without internet access. I believe I have all extensions installed.
[~home]$ npx playwright codegen
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/playwright failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /nfsshare/home/dvamosi/.npm/_logs/2023-01-26T20_02_26_465Z-debug.log
Install for [ 'playwright#latest' ] failed with code 1
im just looking to record a playwright file on RHEL without internet access

Terminal 'ionic start' gives npm ERR

I am trying to start my first ionic project based on VUE, following the steps on https://ionicframework.com/docs/intro/cli
I reinstalling nodejs, tried uninstalling ionic > npm cache clear --force > reinstall, as well as launching Visual Studio Code in admin mode. Keep getting same error below. I am out of options, any advice?
? Starter template: blank
√ Preparing directory .\myapp in 1.41ms
√ Downloading and extracting blank starter in 320.71ms
> ionic integrations enable capacitor --quiet -- myapp io.ionic.starter
> npm.cmd i --save -E #capacitor/core#latest
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN ERESOLVE overriding peer dependency
npm ERR! code ECONNRESET
npm ERR! network aborted
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2022-07-18T02_58_39_592Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
npm.cmd i --save -E #capacitor/core#latest exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Installing dependencies may take several minutes.
──────────────────────────────────────────────────────────────────────────────
Ionic Advisory, tailored solutions and expert services by Ionic
Go to market faster
Real-time troubleshooting and guidance
Custom training, best practices, code and architecture reviews
Customized strategies for every phase of the development lifecycle
Learn more: https://ion.link/advisory
──────────────────────────────────────────────────────────────────────────────
> npm.cmd i
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN ERESOLVE overriding peer dependency
npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
npm ERR! 13168:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2022-07-18T02_59_54_033Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
npm.cmd i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I've had the same issue myself but not had much chance to do any digging in to why it's doing it yet but could be a breaking change in a newer version of Angular which the Ionic team haven't picked up on.
In the meantime (assuming you're using Angular), use:
ng serve and access it at http://localhost:4200.

How to solve npm ERR_SOCKET_TIMEOUT error when creating react app?

I use npx create-react-app to boot strap my project. Installation process crashes with:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/#babel%2fhelper-compilation-targets: Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
I open that url with the Chrome browser and it works just fine:
How do I solve this problem?
I had the same error.
The solution was to change the definition of the timeout.
It worked for me like a charm ✨
For changing the timeout,
Run these two commands:
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000
I hope this helps.
tnsaturday. Recently I also faced a similar problem as you. I solved this problem by simply uninstalling the latest node.js version which is 17.5.0 and installing 16.14.0 LTS. So, if you installed the latest version of the node then shift back to the previous version. I hope in this way you can solve your problem.

Ionic Live Update (App Update Plugin)

I tried to implement this plugin and feature on my project but the documentation is too poor, and all the tutorials on internet are using a Cordova Hot Code Push plugin.
Unfortunately the installation of Cordova Hot Code Push CLI client, used by every single tutorial on internet about it, keeps getting an error on:
cordova hot code push error postinstall
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.3.0 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.3.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/midias14/.npm/_logs/2018-06-06T19_45_57_204Z-debug.log
And not being able to resolve, I'm trying to implement hard way.
Any help on doing by hand?
I'm on Ionic3, Ubuntu sys.
I had similar issue yesterday. Try install the plugin with flag --unsafe-perm=true.

Accessing GitHub using NPM on Sonatype Nexus

We're currently using Nexus 2.10, and have successfully used it as a repo for npm.
Building locally through this proxy/mirror works fine, but when trying to run npm install on Bamboo (which doesn't have internet access), it fails, as some dependency tries to reach GitHub to download something, which fails.
error 06-feb-2015 13:29:29 npm http 200 https://nexus.shdir.no/content/groups/npm-all/mkdirp/-/mkdirp-0.3.0.tgz
error 06-feb-2015 13:29:30 npm http GET https://nexus.shdir.no/content/groups/npm-all/formidable
error 06-feb-2015 13:29:30 npm http 200 https://nexus.shdir.no/content/groups/npm-all/formidable
error 06-feb-2015 13:29:45 npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:29:55 npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:30:16 npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:31:16 npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:31:37 npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
error 06-feb-2015 13:31:38 npm ERR! network connect ETIMEDOUT
error 06-feb-2015 13:31:38 npm ERR! network This is most likely not a problem with npm itself
error 06-feb-2015 13:31:38 npm ERR! network and is related to network connectivity.
error 06-feb-2015 13:31:38 npm ERR! network In most cases you are behind a proxy or have bad network settings.
error 06-feb-2015 13:31:38 npm ERR! network
error 06-feb-2015 13:31:38 npm ERR! network If you are behind a proxy, please make sure that the
error 06-feb-2015 13:31:38 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
error 06-feb-2015 13:31:38
error 06-feb-2015 13:31:38 npm ERR! System Windows_NT 6.1.7601
error 06-feb-2015 13:31:38 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
error 06-feb-2015 13:31:38 npm ERR! cwd E:\bamboo\UTV-FP-JOB1\code
error 06-feb-2015 13:31:38 npm ERR! node -v v0.10.17
error 06-feb-2015 13:31:38 npm ERR! npm -v 1.3.8
error 06-feb-2015 13:31:38 npm ERR! syscall connect
error 06-feb-2015 13:31:38 npm ERR! code ETIMEDOUT
error 06-feb-2015 13:31:38 npm ERR! errno ETIMEDOUT
How would I go about this problem? Do I have to add every repo from github/bitbucket to Nexus?
We solved the problem by downloading the binaries manually, and adding them to our Apache server. Won't be fun when updating dependencies, but shouldn't be too bad. Only 3 files.
I'd be happy to use a better solution, if anyone knows of one.
You have to make Nexus available to your Bamboo server and configure npm there just like you did on your workstation. Depending on where Bamboo and Nexus are installed in terms of network topology that might require different steps.
Ideally your repository manager and your CI server are co-located and a high performance connection to each other. This allows for fast downloads of proxied packages as well fast deployments.
You can for example make your Nexus available on the public internet and lock it down to allow only authenticated access and then use it like that from Bamboo.