node.exe : [ERROR] An error occurred while running subprocess capacitor - ionic-framework

I am : getting the following:
node.exe : [ERROR] An error occurred while running subprocess capacitor.
While running command:
**npm install -g #ionic/cli native-run cordova-res**
This throw an error :
**npm : npm ERR! code EEXIST
At line:1 char:1
+ npm install -g #ionic/cli native-run cordova-res
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (npm ERR! code EEXIST:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
npm ERR! path C:\Users\johns\AppData\Roaming\npm\node_modules\#ionic\cli\bin\ionic
npm ERR! dest C:\Users\johns\AppData\Roaming\npm\ionic.cmd
npm ERR! EEXIST: file already exists, cmd shim
'C:\Users\johns\AppData\Roaming\npm\node_modules\#ionic\cli\bin\ionic' ->
'C:\Users\johns\AppData\Roaming\npm\ionic.cmd'
npm ERR! File exists: C:\Users\johns\AppData\Roaming\npm\ionic.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\johns\AppData\Roaming\npm-cache\_logs\2021-08-03T16_41_11_231Z-debug.log**
I can you please help

Related

Ionic Capcitor build Android unable to resolve dependency tree

I am receiving an error when attempting to run ionic capacitor build android (details below):
PS C:\Users\User\source\repos\imango\src> ionic capacitor build android
npm.cmd i -E #capacitor/android#latest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mango#0.0.1
npm ERR! Found: #capacitor/core#3.7.0
npm ERR! node_modules/#capacitor/core
npm ERR! #capacitor/core#"^3.5.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #capacitor/core#"^4.0.0" from #capacitor/android#4.0.1
npm ERR! node_modules/#capacitor/android
npm ERR! #capacitor/android#"4.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\User\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache_logs\2022-08-06T22_53_19_523Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
npm.cmd i -E #capacitor/android#latest exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Your capacitor cli version is still set at 3.6.0 in your
devDependencies, try changing that to ^4.0.1 and clearing your
node_modules and removing your package-lock.json and run npm install
again.
Check this
Copied from her:
https://github.com/ionic-team/capacitor/issues/5812

Cannot install Ionic on macOS 10.12.3

I have had considerable trouble trying to install Ionic on my Mac. I have tried every suggestion posted on the web without success. I have tried installing as root, using sudo, you name it.
Using Homebrew I have successfully installed node : v6.10.0 and npm v4.1.2.
Issuing: "npm install -g cordova ionic"
Results in:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.10.0
npm ERR! npm v4.1.2
npm ERR! path /Users/craigmaxey/.npm
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/craigmaxey/.npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
npm ERR! node v6.10.0
npm ERR! npm v4.1.2
npm ERR! path npm-debug.log.3262676290
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'npm-debug.log.3262676290'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, open 'npm-debug.log.3262676290'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.3262676290' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/craigmaxey/npm-debug.log
This:
EPERM: operation not permitted, mkdir '/Users/craigmaxey/.npm'
indicates that you're missing write privileges on /Users/craigmaxey/.npm. Usually, you can fix this by running npm with sudo:
sudo npm install -g cordova ionic
If this doesn't work for you (since you mentioned you already tried sudo), please add the exact error message you get from running this exact command.
I too was getting the same errors and was able to get it to install following these steps:
Using Finder, manually create a folder called "#ionic" at this location: /usr/local/lib/node_modules/#ionic
Using finder, if "ionic" folder exists at /usr/local/bin/ionic, delete it
run sudo npm install -g #ionic/cli

Ionic is not recognized as an internal or external command

how to resolve can i fixed it . i already install cordova and ionic global
C:\Users\sever>npm install -g ionic
npm ERR! not a package C:\Users\sever\ionic
npm ERR! addLocal Could not install C:\Users\sever\ionic
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\sever\node_modu
les\npm\bin\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v5.1.1
npm ERR! npm v3.9.3
npm ERR! path C:\Users\sever\AppData\Local\Temp\npm-5068-24aad619\unpack-77f32b4
3\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sever\AppData\
Local\Temp\npm-5068-24aad619\unpack-77f32b43\package.json'
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sever\AppData\
Local\Temp\npm-5068-24aad619\unpack-77f32b43\package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\sever\npm-debug.log
you just have to run
npm install -g cordova
and
npm install -g ionic
And then in windows you have to reopen the cmd window, else the changes aren't noticed.
My problem is npm -v is 3.10.8, which is lower than 4, causing me npm install -g ionic cordova always fail. Giving error like below.
'ionic' is not recognized as an internal or external command, ...
After I run npm install -g npm everything seem fine, and now I can run npm install -g ionic cordova

"npm install googleapis" produces the following error

"npm install googleapis" produces the following error:
npm ERR! Error: No compatible version found: inherits#'^2.0.1'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","2.0.0","2.0.1"]
npm ERR! at installTargetsError (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:553:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:477:15
npm ERR! at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:218:7
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
I had the same problem (OS X 10.9.4). What turned out to be the problem was a dated node/npm installation, which I upped to the latest version from the node.js homepage. Not sure if node or npm is the culprit, but upgrading both fixed the problem you describe.

SOAP in Node.js

Sure, you're gonna tell me that SOAP is deprecated and all, well I'm forced to use it.
Now, I've tried with the douche module (https://github.com/marcgreenstock/douche) but it fails when I do this (the WSDL url is fine, in fact I'm trying the provided example at test/index.js)
Client.wsdl.parse(function(wsdl) {
console.log(wsdl);
});
The error is:
/usr/local/lib/node_modules/douche/lib/douche/wsdl.js:74
attrs.forEach(function(url,index) {
^
TypeError: Object #<Object> has no method 'forEach'
at [object Object]._read_namespaces (/usr/local/lib/node_modules/douche/lib/douche/wsdl.js:74:9)
at /usr/local/lib/node_modules/douche/lib/douche/wsdl.js:20:10
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/douche/lib/douche/wsdl.js:102:7)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.ondata (http.js:1226:22)
at Socket._onReadable (net.js:683:27)
at IOWatcher.onReadable [as callback] (net.js:177:10)
About soap (https://github.com/milewise/node-soap) I can't even install it with NPM, it fails:
> node-expat#1.3.2 install /home/warorface/node_modules/soap/node_modules/node-expat
> node-waf configure build
> compress#0.1.9 preinstall /home/warorface/node_modules/soap/node_modules/compress
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.127s)
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Waf: Entering directory `/home/warorface/node_modules/soap/node_modules/node-expat/build'
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
[1/2] cxx: node-expat.cc -> build/default/node-expat_1.o
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
../node-expat.cc:6:19: fatal error: expat.h: No existe el fichero o el directorio
compilation terminated.
Waf: Leaving directory `/home/warorface/node_modules/soap/node_modules/node-expat/build'
Build failed: -> task failed (err #1):
{task: cxx node-expat.cc -> node-expat_1.o}
Checking for gcc : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for library z : npm ERR! error installing node-expat#1.3.2 Error: node-expat#1.3.2 install: `node-waf configure build`
npm ERR! error installing node-expat#1.3.2 `sh "-c" "node-waf configure build"` failed with 1
npm ERR! error installing node-expat#1.3.2 at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing node-expat#1.3.2 at ChildProcess.emit (events.js:67:17)
npm ERR! error installing node-expat#1.3.2 at ChildProcess.onexit (child_process.js:192:12)
npm ERR! error installing soap#0.0.1 Error: node-expat#1.3.2 install: `node-waf configure build`
npm ERR! error installing soap#0.0.1 `sh "-c" "node-waf configure build"` failed with 1
npm ERR! error installing soap#0.0.1 at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing soap#0.0.1 at ChildProcess.emit (events.js:67:17)
npm ERR! error installing soap#0.0.1 at ChildProcess.onexit (child_process.js:192:12)
npm ERR! node-expat#1.3.2 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the node-expat#1.3.2 install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.38-8-generic-pae
npm ERR! command "node" "/usr/local/bin/npm" "install" "soap"
Traceback (most recent call last):
File "/usr/local/bin/node-waf", line 16, in <module>
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 241, in configure
conf.sub_config([''])
File "/usr/local/bin/../lib/node/wafadmin/Configure.py", line 221, in sub_config
self.recurse(k, name='configure')
File "/usr/local/bin/../lib/node/wafadmin/Utils.py", line 634, in recurse
f(self)
File "/home/warorface/node_modules/soap/node_modules/compress/wscript", line 18, in configure
File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 444, in check
ret = self.run_c_code(*k, **kw)
File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 530, in run_c_code
bld.compile()
File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 292, in compile
os.chdir(back)
OSError: [Errno 2] No such file or directory: '/home/warorface/node_modules/soap/node_modules/compress/build/.conf_check_0'
npm ERR! error installing compress#0.1.9 Error: compress#0.1.9 preinstall: `node-waf configure build`
npm ERR! error installing compress#0.1.9 `sh "-c" "node-waf configure build"` failed with 1
npm ERR! error installing compress#0.1.9 at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing compress#0.1.9 at ChildProcess.emit (events.js:67:17)
npm ERR! error installing compress#0.1.9 at ChildProcess.onexit (child_process.js:192:12)
npm ERR!
Fixed that issue and forked the marcgreenstock/douche repository on github:
https://github.com/kr1sp1n/douche
Install my customized douche:
git clone git#github.com:kr1sp1n/douche.git
cd douche
npm link
cd /path/to/your/project
npm uninstall douche
npm link douche
That's it!