Ionic 2 camera plugin Installation error - ionic-framework

I am trying to install ionic plugin add cordova-plugin-camera
and getting following error in windows system-
Ionic cordova -plugin installation error
Error: Failed to fetch plugin cordova-plugin-camera via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Error: cmd: Command failed with exit code 4294963248 Error output: node-pre-gyp ERR! UNCAUGHT EXCEPTION node-pre-gyp ERR! stack Error: Cannot find module 'internal/fs' node-pre-gyp ERR! stack at Function.Module._resolveFilename (module.js:470:15) node-pre-gyp ERR! stack at Function.Module._load (module.js:418:25) node-pre-gyp ERR! stack at Module.require (module.js:498:17) node-pre-gyp ERR! stack at require (internal/module.js:20:19) node-pre-gyp ERR! stack at evalmachine.<anonymous>:18:20 node-pre-gyp ERR! stack at Object.<anonymous> (D:\Ionic Demo\Social-Media\node_modules\thread-sleep\node_modules\node-pre-gyp\nod e_modules\tar\node_modules\fstream\node_modules\graceful-fs\fs.js:11:1) node-pre-gyp ERR! stack at Module._compile (module.js:571:32) node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:580:10) node-pre-gyp ERR! stack at Module.load (module.js:488:32) node-pre-gyp ERR! stack at tryModuleLoad (module.js:447:12) node-pre-gyp ERR! System Windows_NT 6.1.7601 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Ionic Demo\\Social-Media\\node_modules\\thread-sleep\\node_modul es\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd D:\Ionic Demo\Social-Media\node_modules\thread-sleep node-pre-gyp ERR! node -v v7.5.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.9 node-pre-gyp ERR! This is a bug in `node-pre-gyp`. node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help: node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep#1.0.4 (node_modules\thread-sleep): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep#1.0.4 install: `node-pre-gyp install --fallback-to-build` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 7 npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordov a-plugin-camera" "--save" npm ERR! node v7.5.0 npm ERR! npm v4.1.2 npm ERR! path D:\Ionic Demo\Social-Media\node_modules\thread-sleep\node_modules\node-pre-gyp\node_modules\nopt\node_modules npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall scandir npm ERR! Error: EPERM: operation not permitted, scandir 'D:\Ionic Demo\Social-Media\node_modules\thread-sleep\node_modules\node-pre-g yp\node_modules\nopt\node_modules' npm ERR! { Error: EPERM: operation not permitted, scandir 'D:\Ionic Demo\Social-Media\node_modules\thread-sleep\node_modules\node-pr e-gyp\node_modules\nopt\node_modules' npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'scandir', npm ERR! path: 'D:\\Ionic Demo\\Social-Media\\node_modules\\thread-sleep\\node_modules\\node-pre-gyp\\node_modules\\nopt\\node_modu les' } 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! D:\Ionic Demo\Social-Media\node_modules\npm-debug.log
Any help in this would be appreciable,thanks

I solved this reinstalling the plugin for backwards compatible with previous versions of Cordova cordova-plugin-compat.
You have to follow this steps:
cordova plugin remove --force cordova-plugin-compat
cordova plugin add cordova-plugin-compat
cordova plugin add cordova-plugin-camera

Related

im try to connect wio terminal to edge impulse, ive downloaded the node

C:\Users\Maysam ALKHALAF>npm install -g edge-impulse-cli
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\nodejs\node_modules\edge-impulse-cli
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\edge-impulse-cli'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\edge-impulse-cli'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\Program Files\nodejs\node_modules\edge-impulse-cli'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Maysam ALKHALAF\AppData\Local\npm-cache_logs\2022-12-07T14_11_39_963Z-debug-0.log
C:\Users\Maysam ALKHALAF>
i downloaded the node, downloaded arduino cli, and when i run the npm i get this error, they were also added to my path so i dont know what to do

Ionic Admob plugin error during installation

I have this error while I trying to install Admob Plus plugin:
$ npm install #awesome-cordova-plugins/admob-plus
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: pet-alert#0.0.1
npm ERR! Found: #awesome-cordova-plugins/core#5.37.3
npm ERR! node_modules/#awesome-cordova-plugins/core
npm ERR! peer #awesome-cordova-plugins/core#"^5.1.0" from #awesome-cordova-plugins/geolocation#5.37.3
npm ERR! node_modules/#awesome-cordova-plugins/geolocation
npm ERR! #awesome-cordova-plugins/geolocation#"^5.37.3" from the root project
npm ERR! peer #awesome-cordova-plugins/core#"^5.1.0" from #awesome-cordova-plugins/photo-viewer#5.41.0
npm ERR! node_modules/#awesome-cordova-plugins/photo-viewer
npm ERR! #awesome-cordova-plugins/photo-viewer#"^5.41.0" from the root project
npm ERR! 2 more (#awesome-cordova-plugins/splash-screen, #awesome-cordova-plugins/status-bar)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! #awesome-cordova-plugins/admob-plus#"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #awesome-cordova-plugins/core#6.1.0
npm ERR! node_modules/#awesome-cordova-plugins/core
npm ERR! peer #awesome-cordova-plugins/core#"^6.0.1" from #awesome-cordova-plugins/admob-plus#6.1.0
npm ERR! node_modules/#awesome-cordova-plugins/admob-plus
npm ERR! #awesome-cordova-plugins/admob-plus#"*" 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.
I can't understand what the problem is and what the conflict is.
How can i solve this?
Thanks

ionic start with blank template giving error

I installed latest node, npm and angular
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: z#0.0.1
npm ERR! Found: #angular/compiler#11.0.9
npm ERR! node_modules/#angular/compiler
npm ERR! dev #angular/compiler#"~11.0.5" from the root project
npm ERR! peer #angular/compiler#"11.0.9" from #angular/compiler-cli#11.0.9
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"~11.0.5" from the root project
npm ERR! peer #angular/compiler-cli#"^11.0.0" from #angular-devkit/build-angular#0.1100.7
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"11.1.2" from #angular/localize#11.1.2
npm ERR! node_modules/#angular/localize
npm ERR! peerOptional #angular/localize#"^11.0.0" from #angular-devkit/build-angular#0.1100.7
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" 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\JatinKumar\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\JatinKumar\AppData\Local\npm-cache\_logs\2021-02-04T19_41_41_433Z-debug.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.
run npm install --force
and then
npm install --save-dev --force
Now you can run your project!

Running subprocess npm get me a error when creating ionic project

I just get this error when I try to lunch a new project on ionic 2.
I got a mkdir error, even by running the command on sudo, I use mac os.
I tried reinstall node, cordovan npm, tried to make some update, and googled the problem but can't find a solution.
Please help me, I'm an ionic beginner.
The error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/Loic/appIonic/swipeCard/test/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/Loic/appIonic/swipeCard/test/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/Loic/appIonic/swipeCard/test/node_modules/node-sass
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.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! /Users/Loic/.npm/_logs/2018-09-22T16_45_54_600Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Thank
Try clearing the npm cache at C:\Users\\AppData\Roaming\npm-cache\
I was not using ionic for like six months. When i came back they asked me to update ionic to the latest version. After the update i can't even start a new project. So after wasting sometime i just downgraded to ionic 3.20.0 using the command
npm install -g cordova ionic#3.20.0
and now it's working fine

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