Can't create a cordova project, proxy issue? - node.js

I'm trying to create a project after installing cordova via the command line : npm install -g cordova. The installation apparently goes well, I don't get errors, except couple of warnings which I don't know the cause :
npm WARN engine cordova-js#3.8.0: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN engine npm#1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node": "0.12.0","npm":"2.5.1"})
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
C:\Users\SALWA\AppData\Roaming\npm\cordova -> C:\Users\SALWA\AppData\Roaming\npm\node_modules\cordova\bin\cordova
cordova#4.3.0 C:\Users\SALWA\AppData\Roaming\npm\node_modules\cordova
├── underscore#1.7.0
├── q#1.0.1
├── nopt#3.0.1 (abbrev#1.0.5)
└── cordova-lib#4.3.0 (valid-identifier#0.0.1, osenv#0.1.0, properties-parser#0.
2.3, bplist-parser#0.0.6, mime#1.2.11, semver#2.0.11, unorm#1.3.3, shelljs#0.3.0, rc#0.5.2, dep-graph#1.1.0, d8#0.4.4, xcode#0.6.7, elementtree#0.1.5, through2#0.6.3, npmconf#0.1.16, glob#4.0.6, npm#1.3.4, request#2.47.0, plist#1.1.0, init-package-json#1.3.0, tar#1.0.2, cordova-js#3.8.0)
After this, I try to create a project using the following command line :
cordova create electionscasa com.geomatic.electionscasa ElectionsCasa
but then I get this error :
Creating a new cordova project with name "ElectionsCasa" and id "com.geomatic.electionscasa" at location "C:\myApp\electionscasa"
Downloading cordova library for www...
Error: tunneling socket could not be established, cause=connect ECONNREFUSED
at ClientRequest.onError (C:\Users\SALWA\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\request\node_modules\tunnel-agent\index.js:168:17)
at ClientRequest.g (events.js:199:16)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:272:9)
at Socket.emit (events.js:107:17)
at net.js:451:14
at process._tickCallback (node.js:355:11)
I've looked for a solution to this problem but I couldn't find any although I think it's related to the proxy ?
So I took a look on the environment variables and didn't find : http_proxy nor https_proxy.. So I added them and set them respectively to :
HTTP_PROXY: http://localhost:8080
HTTPS_PROXY: https://localhost:8080
I re-typed the previous command but still get the same error..
Please help as I'm stuck with this error and can't move forward..
Thanks in advance!
P.S: I've installed NodeJS beforehand and I'm working on my local machine (not a corporate), under windows 7.

You might try:
npm config set registry=http://registry.npmjs.org/
or
npm config set strict-ssl false
If that seems to work then it has to do with the self-signed certificate on the server in question.

Related

the vue-awesome-swiper dependency was not found

I tried to use swiper plugin on my nuxtjs project. But I've got error on my command line when I running "yarn run dev":
`
yarn run dev
yarn run v1.22.19
$ nuxt
WARN sass-loader#13.1.0 is installed but ^10.1.1 is expected
╭───────────────────────────────────────╮
│ │
│ Nuxt # v2.15.8 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
i Preparing project for development
i Initial build may take a while
√ Builder initialized
√ Nuxt files generated
* Client █████████████████████████ building (39%) 245/251 modul
es 6 active
node_modules\setimmediate\setImmediate.js
× Server
Compiled with some errors in 9.04s
× Client
Compiled with some errors in 10.53s
× Server
Compiled with some errors in 9.04s
ERROR Failed to compile with 1 errors
This dependency was not found:
* vue-awesome-swiper/dist/ssr in ./plugins/swiper.js
To install it, you can run: npm install --save vue-awesome-swiper/dist/ssr
i Waiting for file changes
i Memory usage: 143 MB (RSS: 232 MB)
i Listening on: http://localhost:3000/
WARN Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
`
vue-awesome-swiper does not detected while I've installed by "yarn add vue-awesome-swiper".
And I've followed this instruction on cmd:
npm install --save vue-awesome-swiper/dist/ssr
i Waiting for file changes
i Memory usage: 143 MB (RSS: 232 MB)
i Listening on: http://localhost:3000/
But still have issued on my code. Does anyone have same problems and had solution?

Unable to get local issuer certificate error while building kibana - yarn build

I am facing the unable to get local issuer certificate error when I try to build kibana using the command - yarn build --skip-os-packages
I have tried these solutions before which didn't work :
disabling TLS connection using set NODE_TLS_REJECT_UNAUTHORIZED=0 but then the build throws a warning and terminates the process.
yarn config set strict-ssl false
Below is the complete error :
yarn build --skip-os-packages
yarn run v1.22.17
$ node scripts/build --all-platforms --skip-os-packages
info [ global ] Verifying environment meets requirements
│ succ Node.js version verified
│ succ ✓ 0 sec
info [ global ] Cleaning artifacts from previous builds
│ debg Deleted 0 files/directories
│ succ ✓ 0 sec
info [ global ] Downloading node.js builds for all platforms
│ debg Downloading shasum values for node version 14.17.2 from https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v14.17.2/SHASUMS256.txt
│ERROR failure 1 sec
│ERROR Error: unable to get local issuer certificate
│ at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34)
│ at TLSSocket.emit (events.js:375:28)
│ at TLSSocket._finishInit (_tls_wrap.js:936:8)
│ at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

installing front end folder in Agora isn't working

i'm trying to install Agora video chat template on my VS code , i've deploy the back end it to Heroku and download the source code from Agora and install it on my npm window , when i run the command npm start , it installs only the back end directory and ignore the front end , and this is the error message i got :
⌂ Main Menu ▼ install ┌──────────────────────────────────────────────────────────────┐ │ │√ Node >= 14.0 exists │ Description │√ Cleaned project directories │ Installs the codebase onto your local machine │| Downloading frontend │ │√ Downloading backend │ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────┘
C:\Users\lenovo\Documents\current project\agora-chat-app\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
Error: spawn npx ENOENT
at notFoundError (C:\Users\lenovo\Documents\current project\agora-chat-app\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\lenovo\Documents\current project\agora-chat-app\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\lenovo\Documents\current project\agora-chat-app\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Users\lenovo\Documents\current project\agora-chat-app\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn npx',
path: 'npx',
spawnargs: [
'react-native',
'init',
'omarchat2022',
'--title',
'"Group video by Omar Allam"',
'--template',
'agora-appbuilder-core#2.0.2',
'--skip-install'
]
}
Looks like a Node.js error, I'd suggest updating Node.js to the LTS release.

"ionic start project test" giving error ENOTFOUND github:443

I am trying to create an ionic application but getting below error
Command:-
ionic create testapp sidemenu
Error: getaddrinfo ENOTFOUND github.com github.com:443
"
Creating Ionic app in folder ~..\conference base
d on sidemenu project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Error Initializing app: Error: getaddrinfo ENOTFOUND github.com github.com:443
Error: getaddrinfo ENOTFOUND github.com github.com:443
at errnoException (dns.js:26:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
getaddrinfo ENOTFOUND github.com github.com:443 (CLI v1.7.8)
Your system information:
Cordova CLI: 5.4.0
Ionic CLI Version: 1.7.8
Ionic App Lib Version: 0.6.4
OS: Windows 7 SP1
Node Version: v4.2.1
"
Please suggest how to resolve this, I am new in phonegap/ionic/nodejs
[EDIT] proxy has already been configured successfully.
You have to update your ionic version. This command can't be launch with a CLI version under v1.7.10.
Have a look at the tutorial : https://creator.ionic.io/app/dashboard/help/videos
I am also getting that same Issue.
I also set proxy, http-proxy for npm already but still getting issue
I Fixed this by setting proxy in ionic module as explained in this link
Basically you just need to add below line at line no 421 (approx. just before tunnel creation in code) in require.js for setting proxy and then this Ionic CLI will start working.
// hack to add proxy
self.proxy = 'http://proxy-ip:proxy-port';

bcrypt fails after a successful installation

I'm having trouble deploying my application on the OpenShift platform.
It seems like it's bcrypt that fails but everything also seems to install properly.
I'm afraid I'll be having same trouble with every node module I wanna use.
I thought that may be, the problem is with the version of the node module.
Still I have no clue. I hope someone could help me find out what's going on.
I copy bellow my entire jenkins console output (note that I had the exact same output after my first git push on the OpenShift server).
Started by user Jenkins Admin Building remotely on nodejsbldr in workspace /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.Channel#129c587:nodejsbldr Using strategy: Default Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.LocalChannel#d1cdcd Wiping out workspace first. Cloning the remote Git repository Cloning repository origin Fetching upstream changes from ssh://mySshPrivateId#nodejs-caty.rhcloud.com/~/git/nodejs.git Seen branch in repository origin/HEAD Seen branch in repository origin/alpha Seen branch in repository origin/master Commencing build of Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) Checking out Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) No change to record in branch origin/alpha [repo] $ /bin/sh -xe /tmp/hudson154161094843280943.sh
+ source /usr/lib/openshift/cartridge_sdk/bash/sdk
++ '[' false == true ']'
++ OO_BASH_SDK=true
+ alias 'rsync=rsync --delete-after -az -e '\''/usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh'\'''
+ upstream_ssh=mySshPrivateId#nodejs-caty.rhcloud.com
+ rm -f /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json
+ marker_present force_clean_build
+ '[' -f /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo//.openshift/markers/force_clean_build ']'
+ set +e
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 'mySshPrivateId#nodejs-caty.rhcloud.com:$OPENSHIFT_BUILD_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 'mySshPrivateId#nodejs-caty.rhcloud.com:$OPENSHIFT_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/
+ set -e
+ gear build Building git ref 'origin/alpha', commit 26cbed2 Building NodeJS cartridge npm info it worked if it ends with ok npm info using npm#1.2.17 npm info using node#v0.10.5 npm info preinstall Caty#0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo npm info linkStuff Caty#0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/csrf npm info preinstall csrf#0.0.3 npm info linkStuff csrf#0.0.3 npm info install csrf#0.0.3 npm info postinstall csrf#0.0.3 npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/session-mongoose npm info preinstall session-mongoose#0.4.1 npm info linkStuff session-mongoose#0.4.1 npm info install session-mongoose#0.4.1 npm info postinstall session-mongoose#0.4.1 npm info install Caty#0.0.1a npm info postinstall Caty#0.0.1a npm info prepublish Caty#0.0.1a npm info ok
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId#nodejs-caty.rhcloud.com 'gear stop --conditional
--exclude-web-proxy --git-ref gtiRefNum' Stopping gear... Stopping MongoDB cartridge Stopping NodeJS cartridge
++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId#nodejs-caty.rhcloud.com 'gear create-deployment-dir'
+ deployment_dir=2014-03-12_22-42-14.111
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json mySshPrivateId#nodejs-caty.rhcloud.com:app-deployments/2014-03-12_22-42-14.111/metadata.json
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh
--exclude .git /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/ mySshPrivateId#nodejs-caty.rhcloud.com:app-root/runtime/repo/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/ mySshPrivateId#nodejs-caty.rhcloud.com:app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/ mySshPrivateId#nodejs-caty.rhcloud.com:app-root/runtime/dependencies/
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId#nodejs-caty.rhcloud.com 'gear remotedeploy
--deployment-datetime 2014-03-12_22-42-14.111' Preparing build for deployment Deployment id is aa14cca3 Activating deployment Starting MongoDB cartridge Starting NodeJS cartridge
DEBUG: Running node-supervisor with DEBUG: program 'app.js' DEBUG:
--watch '.' DEBUG: --ignore 'undefined' DEBUG: --extensions 'node|js|coffee' DEBUG: --exec 'node'
DEBUG: Starting child process with 'node app.js' DEBUG: Watching directory '/var/lib/openshift/mySshPrivateId/app-root/runtime/repo' for changes. Failed to load c++ bson extension, using pure JS version
/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:79
throw e
^ Error: /var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/bcrypt.js:1:97)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12) DEBUG: Program node app.js exited with code 8
DEBUG: Starting child process with 'node app.js' Archiving artifacts Finished: SUCCESS
The extracted quote about the versions :
using npm#1.2.17 npm info using node#v0.10.5
And my application dependencies list :
"dependencies": {
"express": "3.4.8",
"jade": "1.1.5",
"socket.io": "0.9.16",
"bcrypt": "0.7.7",
"colors": "0.6.2",
"connect": "2.13.0",
"connect-mongo": "0.4.0",
"cookie": "0.1.1",
"mongodb": "1.3.23",
"mongoose": "3.8.6"
},
Thanks in advance for anyone brave enough to risk his self into that bunch of infos. :)
I've had the same problem, I suspect that since I am working on a mac it is related to the OSX bcrypt compilation issue that is described here.
I have tried to remove the node_modules directory and let OpenShift run npm and download the dependencies again but for some reason that did not work for me.
I have ended up creating a new application and committing my repository while excluding the node_module folder which solved my problem.

Resources