Unable to publish Loopback application to IBM Cloud using API designer - ibm-cloud

#ibm -
I'm getting following error while trying to publish loopback application on IBM Cloud using API Designer portal. Please help me understand why is it looking into Temp folder to publish the application and how I can bypass that. I keep getting resource busy or locked issue with apiconnect toolkit.
Here's the node, npm and apiconnect toolkit version I'm using currently. Please let me know if you need any additional details.
node - v8.9.4
npm - v5.6.0
apiconnect - v5.0.8.2 (apiconnect: v2.7.111)
Error publishing runtime: Command failed: npm prune --production npm
ERR! path
C:\Users\SUNNY~1.GOE\AppData\Local\Temp\0.6717806509437265-1517290270545\project\node_modules\cryptiles\node_modules\boom\package.json.1443453620
npm ERR! code EBUSY npm ERR! errno -4082 npm ERR! syscall rename npm
ERR! EBUSY: resource busy or locked, rename
'C:\Users\SUNNY~1.GOE\AppData\Local\Temp\0.6717806509437265-1517290270545\project\node_modules\cryptiles\node_modules\boom\package.json.1443453620'
-> 'C:\Users\SUNNY~1.GOE\AppData\Local\Temp\0.6717806509437265-1517290270545\project\node_modules\cryptiles\node_modules\boom\package.json'
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Sunny\npm-cache_logs\2018-01-30T05_31_21_546Z-debug.log Error ID:
a055ee2d-8232-459b-bf62-f4340837a61b

As a simple step, first run this command from cli
apic stop all
and try the publishing loopbaclk application to IBM Bluemix.
In case, this does not resolve the issue, then the problem may be due to permission issues during the installation of APIC toolkit. Uninstall the toolkit do a fresh install of toolkit using '--unsafe-perm' option with the install command to overrides the permisson issues Here is the example
sudo npm install --unsafe-perm -g apiconnect
Try the publish with the new instance of API Connect and see if it resolves the issue.

Related

Running Meteor settings.json from Windows shell

So, I make a Meteor project that uses my MongoDB and other environment variables. Therefore, I create .sh file and write these down.
MONGO_URL="mongodb:<MY DATABASE>" meteor --settings settings.json
However, Meteor cannot realize the current OS is Windows, so it keeps trying to look for meteor modules using Linux's path. Here is the error log.
Runing Meteor with configured db instance in Windows
/mnt/c/Users/mq003/AppData/Local/.meteor/packages/meteor-tool/2.2.0/mt-os.windows.x86_64/meteor: line 137: /mnt/c/Users/mq003/AppData/Local/.meteor/packages/meteor-tool/2.2.0/mt-os.windows.x86_64/dev_bundle/bin/node: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\Windows\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! simple-todos-react# w-start: `cd build\bin && bash w-run.sh`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the simple-todos-react# w-start 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! C:\Users\mq003\AppData\Roaming\npm-cache\_logs\2022-12-06T17_29_40_599Z-debug.log
Does anybody know how to do this in Windows? Thank you in advance.
An easy way to address this is to use crossenv https://www.npmjs.com/package/cross-env
cross-env makes it so you can have a single command without worrying about setting or using the environment variable properly for the platform. Just set it like you would if it's running on a POSIX system, and cross-env will take care of setting it properly.
That way if you have team members using Macs and Windows, it's the same commands, and if you get an upgrade to a Mac yourself, it's seamless.
From what I see you have is likely with your PATH variable.
The error explicitly states it can find the Node.js in you executable directory.
Check to see if any of these identifies the problem. Or I could try to further debug .

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.

how to install ionic capacitor contact native plugin

When i try to install "npm install #awesome-cordova-plugins/contacts" in ionic 6, am getting error as follows
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#awesome-cordova-plugins%2fcontacts - Not found
npm ERR! 404
npm ERR! 404 '#awesome-cordova-plugins/contacts#*' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url. ```
how can i resolve this issue. same issue is happening for uid also.
According to the cordova-contacts-plugin repo here, the cordova-contacts-plugin is deprecated since Nov 27, 2017.
As there is deprecation notice on it's npm repository.
The plugin that is currently in the ionic docs is abandoned but it seems like ionic docs is not updated since then.
I think u have to use this one now:
https://github.com/capacitor-community/contacts
https://www.npmjs.com/package/#capacitor-community/contacts
After installing dependencies you need to sync
ionic cap sync
then run your project. you see no error and successfully run
for more info about this plugin click here
You can install the individual cordova plugins (like contacts) with with #ionic-native/contacts and cordova-plugin-contacts

Strapi - Server wasn't able to start properly

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