I am trying to deploy a git repo on Netlify and I am using parcel in the project.
I am getting the error in the photo about conflicting local requirement.
This is how my dependencies and devDependencies look like:
"dependencies": {
"axios": "^0.21.1",
"bootstrap": "^5.1.0",
"parcel": "^2.0.0-rc.0",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"redux": "^4.1.1",
"redux-devtools-extension": "^2.13.9"
},
"devDependencies": {
"#parcel/transformer-sass": "^2.0.0-beta.3.1"
}
}
and I am getting the error in the photo
Any tip on how to resolve this ?? thanks
Ok solved,
just had to remove parcel as a dependency!
Related
native-square-reader-sdk** for payments in my project.
iOS build is failing due to "Module 'SquareReaderSDK' not found"
package.json
"dependencies": {
"#react-native-community/async-storage": "^1.6.1",
"react": "16.9.0",
"react-native": "0.60.5",
"react-native-camera-kit": "^8.0.1",
"react-native-gesture-handler": "^1.4.1",
"react-native-globalize": "^3.0.0",
"react-native-permissions": "^1.2.0",
"react-native-square-reader-sdk": "1.3.0",
"react-navigation": "^3.11.1",
"react-native-webview": "7.0.5",
"react-native-star-prnt": "1.1.0",
"base-64": "0.1.0"
},
how to solve this ?
thanks
please follow the following steps to install SquareReaderSDK
Steps for SquareSDK Installation
My Nativescript-Vue project has stopped working without reason, i don't know why.
The gradle build is crashing with this error :
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy
I don't know anything about native android developpment with java so i'm struggling with this error since many hours ..
Here is my app.graddle
apply plugin: "com.android.application"
apply plugin: "com.google.gms.google-services"
dependencies {
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support' && requested.name != 'multidex' ) {
details.useVersion '27.1.1'
}
}
}
}
dependencies {
implementation 'org.slf4j:slf4j-nop:1.7.25'
}
android {
defaultConfig {
multiDexEnabled true
generatedDensities = []
applicationId = "org.nativescript.application"
project.ext {
googlePlayServicesVersion = "+"
}
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
and my package.json in case of this error is caused by one nativescript-plugin, which is what I think :
{
"name": "app",
"version": "1.21",
"license": "MIT",
"nativescript": {
"id": "org.nativescript.application",
"tns-ios": {
"version": "5.3.1"
},
"tns-android": {
"version": "5.3.1"
}
},
"scripts": {
"dev:android": "tns debug android --bundle",
"dev:ios": "tns debug ios --bundle",
"lint": "eslint --ext .js,.vue .",
"run:android": "tns run android --bundle",
"run:ios": "tns run ios --bundle",
"clean": "tns platform clean ios; tns platform clean android"
},
"dependencies": {
"axios": "^0.18.0",
"dotenv-webpack": "^1.7.0",
"nativescript": "^5.2.4",
"nativescript-applozic-chat": "^1.2.4",
"nativescript-appversion": "^1.4.1",
"nativescript-barcodescanner": "^3.0.3",
"nativescript-camera": "^4.2.0",
"nativescript-cardview": "^3.1.1",
"nativescript-checkbox": "^3.0.3",
"nativescript-floatingactionbutton": "^5.0.0",
"nativescript-geolocation": "^4.4.2",
"nativescript-google-maps-sdk": "^2.7.0",
"nativescript-google-places-autocomplete": "^1.0.3",
"nativescript-iqkeyboardmanager": "^1.4.0",
"nativescript-keyboard-toolbar": "^1.0.4",
"nativescript-laravel-echo": "^1.0.1",
"nativescript-lottie": "^3.0.2",
"nativescript-modal-datetimepicker": "^1.1.12",
"nativescript-oauth2": "^1.4.1",
"nativescript-pager": "^9.3.14",
"nativescript-phone": "^1.4.0",
"nativescript-plugin-firebase": "^8.1.1",
"nativescript-plugin-gplaces": "^2.4.6",
"nativescript-vue": "^2.0.0",
"nativescript-websockets": "^1.5.3",
"nativescript-windowed-modal": "^5.0.6",
"promise.prototype.finally": "^3.1.0",
"pusher-nativescript": "^1.0.0",
"tns-android": "^5.2.1",
"tns-core-modules": "^5.2.2",
"tns-ios": "^5.2.0",
"ts-loader": "^5.3.3",
"vue-i18n": "^8.9.0",
"vuelidate": "^0.7.4",
"vuex": "^3.0.1"
},
"devDependencies": {
"#babel/core": "^7.0.0",
"#babel/plugin-proposal-class-properties": "^7.4.4",
"#babel/preset-env": "^7.0.0",
"#vue/eslint-config-prettier": "^4.0.1",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"base-64": "^0.1.0",
"clean-webpack-plugin": "^1.0.1",
"copy-webpack-plugin": "^4.5.2",
"css-loader": "^1.0.0",
"date-fns": "^1.30.1",
"eslint": "^5.12.1",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-vue": "^5.1.0",
"lazy": "1.0.11",
"lodash": "^4.17.11",
"nativescript-dev-typescript": "^0.9.0",
"nativescript-dev-webpack": "^0.21.0-next-2019-02-15-084520-01",
"nativescript-image-cache-it": "^4.1.2",
"nativescript-vue-template-compiler": "^2.0.0",
"node-sass": "^4.9.2",
"prettier": "^1.16.1",
"sass-loader": "^7.1.0",
"terser-webpack-plugin": "^1.1.0",
"tns-platform-declarations": "^5.2.2",
"utf8": "^3.0.0",
"vue-loader": "^15.2.6",
"webpack": "^4.16.4",
"webpack-bundle-analyzer": "~3.0.4",
"webpack-cli": "^3.1.0"
}
}
I tried multiple things :
rm -rf hooks/ platforms/ node_modules/ package-lock.json and recompile the whole project
remove the whole .gradle directory in C:/Users/username/ and recompile
uninstall java, and nativescript cli ( tns ) that is globally install, reinstall and recompile
uninstall android-sdk installed with chocolatey in C:/Android, as asked in the nativescript doc, and recompile
tns platform clean android
reclone my project and try to recompile
I'm so desperate that I also created a docker image for nativescript-vue and android to be sure that the error is not related to my computer configuration/environnement, and the error is still here ...
I tried to compile a blank project created with :
vue init nativescript-vue/vue-cli-template
And it's working.
Also, my coworkers can compile the project so it's incomprehensible. My project is the same as theirs, i recloned the project to be sure and they have no not commited files...
I found that the error was caused by this package : "nativescript-google-maps-sdk". Maybe one of the only that i havn't uninstall to see if it was responsible of this error....
Anyway, you can found how i resolved this issue here :
https://github.com/dapriett/nativescript-google-maps-sdk/issues/345#issuecomment-503321201
I need to update Laravel mix to use Babel 7.
I update my dependencies to use Laravel Mix 4.0.7 that should support Babel 7.
"devDependencies": {
"#babel/core": "^7.2.2",
"#babel/plugin-proposal-class-properties": "^7.2.1",
"#babel/preset-env": "^7.2.0",
"#babel/preset-react": "^7.0.0",
"axios": "^0.15.3",
"babel-loader": "^7.1.5",
"bootstrap": "4.1.3",
"browser-sync": "^2.26.3",
"browser-sync-webpack-plugin": "^2.0.1",
"jquery": "^3.1.1",
"laravel-mix": "^4.0.7",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"lodash": "^4.17.10",
"react-color": "^2.14.1",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"styled-components": "^4.0.3",
"vue": "^2.5.13"
}
And in my .babelrc file i have:
{
"loader": "babel-loader",
"presets": ["#babel/preset-env", "#babel/preset-react"],
"plugins": [
"#babel/plugin-proposal-object-rest-spread",
"#babel/plugin-proposal-class-properties",
"#babel/plugin-transform-react-jsx"
]
}
And in my webpack.mix.js i have:
mix.react("resources/assets/app.js", "public/js");
The problem is when i run npm run watch i get the following error:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'babel-core'
Apparently, Laravel Mix is trying to use babel-core instead of #babel/core.
Any ideas on how to solve this?
I believe you need to upgrade babel-loader to 8.x.
If you read the docs at https://www.npmjs.com/package/babel-loader
This README is for babel-loader v8 + Babel v7
Check the 7.x branch for docs with Babel v6
So, babel-loader 8.x work with #babel-core 7. babel-loader 7.x works with babel-core 6.x
I have been trying to stop heroku from pruning my dev dependencies. Here is my config:
My build script is: "build": "NPM_CONFIG_PRODUCTION=false webpack -mode production"
And I have added "heroku-postbuild": "npm run build"
My Dependencies:
"dependencies": {
"express": "^4.16.3",
"react": "^16.5.2",
"react-dom": "^16.5.2"
},
"devDependencies": {
"#babel/core": "^7.0.0",
"#babel/plugin-proposal-class-properties": "^7.0.0",
"#babel/preset-env": "^7.0.0",
"#babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.0",
"babel-loader": "^8.0.0",
"clean-webpack-plugin": "^0.1.19",
"concurrently": "^4.0.0",
"css-loader": "^1.0.0",
"eslint": "^5.0.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"file-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"nodemon": "^1.17.3",
"style-loader": "^0.23.0",
"url-loader": "^1.0.1",
"webpack": "^4.5.0",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.3"
}
I would appreciate any help with the config as I don't want to add my dev dependencies to my dependencies.
Set Heroku env var NPM_CONFIG_PRODUCTION to false with
heroku config:set NPM_CONFIG_PRODUCTION=false
instead of trying to set it in your npm script. See docs.
If you are trying to red the error during production caused by devDependencies, just do this in node.js or similar in the language you are using.
if (process.env.NODE_ENV !== "production") {
require(<devDependency>)
}
When I try to run my React Native app on the iOS simulator, I'm presented with a red screen with the following error:
Ambiguous resolution: module
'/Users/my-user/Documents/my-RN-app/app/index.js' tries to require
'react-native-vector-icons', but there are several files providing
this module. You can delete or fix them:
/Users/my-user/Documents/my-RN-app/ios/build/Build/Products/Debug-iphonesimulator/MyApp.app/my-RN-app/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
/Users/my-user/Documents/my-RN-app/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
However, both of those above files (the package.json files) are missing. I had actually gotten this error before, so I decided to delete the package.json file in the first directory location mentioned above (under ios/build/.. etc.) and refreshed the app and it loaded just fine. Now, after trying to start up my app again in the iOS simulator, I am back to the same error, but I cannot delete the package.json file because it doesn't even exist now in either location.
I've tried to just comment out the import of the react-native-vector-icons lib in my app/index.js file and restarting the sim, but the error still appears.
So finally, I've tried this:
sudo rm -rf node_modules (I get "permission denied" if I don't use sudo although it appears I have full read/write permission on all the files/folders in this project)
sudo rm -rf ios/build
npm install
cd ios && pod install
react-native link
And then back into Xcdoe: Product > Clean, after which I ran the simulator again. Still the same error.
As requested, here is my package.json file:
{
"name": "myApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"run-ios": "node_modules/.bin/react-native run-ios",
},
"dependencies": {
"art": "^0.10.1",
"auto-bind": "^1.1.0",
"axios": "^0.16.1",
"eslint-plugin-react-native": "^2.3.1",
"jwt-decode": "^2.2.0",
"moment": "^2.19.1",
"native-base": "^2.3.1",
"prop-types": "^15.5.8",
"pubnub": "^4.18.0",
"react": "^16.0.0",
"react-native": "^0.49.3",
"react-native-actionsheet": "^2.3.0",
"react-native-device-info": "^0.11.0",
"react-native-fabric": "^0.5.1",
"react-native-fingerprint-scanner": "^2.2.1",
"react-native-flip-card": "^3.5.2",
"react-native-google-analytics-bridge": "^5.3.3",
"react-native-haptic": "^1.0.5",
"react-native-image-base64": "^0.1.3",
"react-native-image-picker": "^0.26.7",
"react-native-image-resizer": "^1.0.0",
"react-native-keyboard-aware-scroll-view": "^0.4.3",
"react-native-keyboard-spacer": "^0.4.1",
"react-native-keychain": "^1.2.1",
"react-native-maps": "^0.17.1",
"react-native-modal-dropdown": "^0.5.0",
"react-native-mplayer": "^1.0.1",
"react-native-notifications-badge-extensions": "^1.0.5",
"react-native-permissions": "^0.2.7",
"react-native-pie": "^0.4.0",
"react-native-router-flux": "^4.0.0-beta.26",
"react-native-snap-carousel": "^3.2.3",
"react-native-tag-input": "0.0.18",
"react-native-tooltip": "^5.2.0",
"react-native-uuid-generator": "^3.0.2",
"react-native-vector-icons": "^4.3.0",
"react-native-version-number": "^0.1.3",
"react-native-voice": "^0.2.5",
"react-navigation": "^1.2.0",
"sprintf-js": "^1.0.3",
"validator": "^9.2.0"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "^4.0.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.3.1",
"eslint": "^3.14.1",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^7.5.1",
"jest": "18.1.0",
"jest-serializer-enzyme": "^1.0.0",
"jsdom": "11.6.2",
"jsdom-global": "3.0.2",
"metro-bundler": "^0.20.0",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.2.0",
"react-native-mock": "^0.3.1",
"react-test-renderer": "16.0.0-alpha.12",
"sinon": "^4.1.2"
},
"resolutions": {
"moment": "2.19.1"
}
}
I had to manually link the React pod to node_modules:
pod 'React', :path => '../node_modules/react-native'
Then clean and build again