I'm building an Ionic App in which I want to use the cordova camera plugin, therefore I do type:
ionic cordova plugin add cordova-plugin-camera
And then I do:
npm install --save #ionic-native/camera
Here I'm getting this warnings:
npm WARN #ionic-native/camera#5.0.0 requires a peer of #ionic-native/core#5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
After that when I include the camera plugin in the app.module and in the list of providers Im getting this message:
Error: Invalid provider for the NgModule 'AppModule' - only instances of Provider and Type are allowed, got: [StatusBar, SplashScreen, [object Object], ?[object Object]?]
at syntaxError (http://localhost:8100/build/vendor.js:74769:34)
at http://localhost:8100/build/vendor.js:89925:40
at Array.forEach (<anonymous>)
at CompileMetadataResolver._getProvidersMetadata (http://localhost:8100/build/vendor.js:89893:19)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:8100/build/vendor.js:89463:50)
at JitCompiler._loadModules (http://localhost:8100/build/vendor.js:107787:87)
at JitCompiler._compileModuleAndComponents (http://localhost:8100/build/vendor.js:107748:36)
at JitCompiler.compileModuleAsync (http://localhost:8100/build/vendor.js:107664:37)
at CompilerImpl.compileModuleAsync (http://localhost:8100/build/vendor.js:73605:49)
at PlatformRef.bootstrapModule (http://localhost:8100/build/vendor.js:5747:25)
Due to the release of Ionic 4, installing Ionic Native plugins for Ionic 3 requires appending #4 when installing for Ionic 3. So to resolve this, uninstall the plugin with npm uninstall --save #ionic-native/camera, then reinstall with npm uninstall --save #ionic-native/camera#4 and the issue will be resolved.
You have missed the ionic/core dependency modules. So install them by the following command
npm i #ionic-native/core
and try to install camera
ionic cordova plugin add cordova-plugin-camera
npm install --save #ionic-native/camera
and before proceeding to other steps, please check them whether they add or in the package.json and config.xml
Related
I have tried nearly all solutions however nothing has worked for me. i cloned a repo from a friend and tried to run the client directory. When i try run client, i get the error:
Cannot find module 'webpack-cli/bin/config-yargs'
Cannot find module 'webpack-cli'
Once i cloned the project i did npm install (as it said in the readME) but when i tried to run the client i would run into this problem:
solutions i tried:
npm install -g vue-cli
npm install --save-dev webpack
npm install --save-dev webpack-cli
i tried 'webpack --version' it will tell me i am missing something and if i want to install it. i click yes and i get the following error:
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN ajv-keywords#3.4.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#3.4.0 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#3.1.11 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli#3.3.11 requires a peer of webpack#4.x.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
webpack-cli#3.3.11
updated 1 package and audited 12959 packages in 13.437s
24 packages are looking for funding
run npm fund for details
found 33 vulnerabilities (22 low, 7 moderate, 4 high)
run npm audit fix to fix them, or npm audit for details
Error: Cannot find module 'webpack-cli'
UPDATE:
My colleague updated some of the dependencies by GitHub bot and i pulled the repo. That seemed to do the trick
Just to clarify, I'm running a Windows computer using Android Studio.
I'm trying to set up a QR code scanner using react-native-camera in a react native application.
I can install the library without a problem:
$ npm install react-native-camera --save
gives
npm WARN babel-eslint#10.0.1 requires a peer of eslint#>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-eslint-comments#3.1.2 requires a peer of eslint#>=4.19.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-flowtype#2.50.3 requires a peer of eslint#>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jest#22.4.1 requires a peer of eslint#>=5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react#7.12.4 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-hooks#1.6.1 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native#3.6.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename '[file location]\node_modules\.staging\fsevents-7a20bca6\node_modules\needle' -> '[file location]\node_modules\.staging\needle-41ea96cc'
+ react-native-camera#3.8.0
updated 1 package and audited 948127 packages in 76.202s
found 0 vulnerabilities
Every online reference I have have seen, such as https://facebook.github.io/react-native/docs/linking-libraries-ios
only seem to give instructions if you are programming for iOS on a Mac.
Documents for the library at https://react-native-community.github.io/react-native-camera/docs/installation recommends autolinking using
$ react-native link react-native-camera.
I get:
info Linking "react-native-camera" iOS dependency
info iOS module "react-native-camera" has been successfully linked
info Linking "react-native-camera" Android dependency
info Android module "react-native-camera" has been successfully linked
The problem arises when building it on my device, using $ react-native run-android, where I get:
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-camera (to unlink run: "react-native unlink react-native-camera")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
The only results for manual linking is on XCode, but can anyone help me with Android Studio? I would really appreciate it.
It looks like you are using new version of react-native (0.60 or higher). In this case, you don't have to link your library yourself, as libraries that support latest react-native now link themselves upon installation.
You should be able to do npm install react-native-camera --save and have it working. In case you used react-native link react-native-camera before, you may now need to run react-native unlink react-native-camera to revert what was done by link command. You might also need to reinstall the library (npm uninstall react-native-camera followed by npm install react-native-camera --save). If it still doesn't work you can go through manual installation of this library
I installed expo using the facebook guide by running
npm install -g expo-cli
npm install react-navigation
expo start
However it still says
npm WARN #react-native-community/netinfo#2.0.10 requires a peer of react-native#>=0.57 <0.60 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps#9.4.5 requires a peer of #types/googlemaps#^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps#9.4.5 requires a peer of #types/markerclustererplus#^2.1.29 but none is installed. You must install peer dependencies yourself.
npm WARN react-google-maps#9.4.5 requires a peer of #types/react#^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated#1.0.1 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated#1.0.1 requires a peer of react-native#^0.44.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-webview#5.8.1 requires a peer of react-native#>=0.57 <0.60 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I tried to delete my node_modules folder and rerunning npm install in the directory of my project
It still says react-native not found, although running
react-native -v
in command line, shows
react-native-cli: 2.0.1
react-native: 0.60.3
Actually you have only install expo-cli not react native cli , even if your package.json has react-native it is not accessiable from your cli . so you have to install react-native-cli seperately so that you can access react-native.
npm install –g react-native-cli
I have created a vue-cli project.
And I tried to add vuetify but I couldn't do it
I've run: npm install vuetify --save
A error came out on terminal:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.3 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
When I try to import vuetify on main.js it says that can't find the module.
Does anyone know how to fix/install it?
You could try using yarn, I find it sometimes performs better
install yarn
npm i -g yarn
Then install dependencies (run in your package.json file folder)
yarn
You can also do a clean install by first removing the nodes_modules folder, and then install without optional dependencies npm install --no-optional
I just started to use npm command while learning angularJS2. I get errors while trying to install packages using npm command, for instance when i try to run this command
npm install json-typescript-mapper --save
to install json to typescript mapper package, i am not able to install it. am i missing something, should i change the registry? my current registry is http://registry.npmjs.org/ should i have to change the registry inorder to install the package
ERROR
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.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
and after that when i try to import the package, i get an error stating the package not found because the package was not added