Summary
When running npx expo run:android android build fails with this error. See logs:
Tried to install expo-modules-core explicitly.
Tried upgrading Gradle plugin from 7.1.1 up to 7.3.3 and 7.5.
Did not find any more solutions on the internet.
Any idea what to do?
Related github issue https://github.com/expo/expo/issues/19596
What platform(s) does this occur on?
Android
SDK Version
46
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.6
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.5.0 - /usr/local/bin/npm
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
npmPackages:
#expo/metro-config: ^0.4.0 => 0.4.0
expo: ~46.0.16 => 46.0.16
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-native: 0.69.6 => 0.69.6
react-native-web: ~0.18.7 => 0.18.9
npmGlobalPackages:
eas-cli: 2.4.1
expo-cli: 6.0.6
Expo Workflow: bare
Minimal reproducible example
Package.json
{
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll",
"debug": "open 'rndebugger://set-debugger-loc?host=localhost&port=19000'",
"debug dev": "open 'rndebugger://set-debugger-loc?host=localhost&port=8081'"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo-google-fonts/raleway": "^0.2.2",
"#expo/config-plugins": "^5.0.0",
"#expo/metro-config": "^0.4.0",
"#expo/vector-icons": "^13.0.0",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-native-community/datetimepicker": "6.2.0",
"#react-native-masked-view/masked-view": "0.2.7",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"#react-navigation/stack": "^6.3.1",
"#reduxjs/toolkit": "^1.8.5",
"#rneui/base": "^4.0.0-rc.6",
"#rneui/themed": "^4.0.0-rc.6",
"#sentry/react-native": "4.2.2",
"#stripe/stripe-react-native": "^0.19.0",
"dotenv": "^16.0.2",
"expo": "~46.0.16",
"expo-app-loading": "~2.1.0",
"expo-apple-authentication": "~4.3.0",
"expo-application": "~4.2.2",
"expo-background-fetch": "~10.3.0",
"expo-build-properties": "~0.3.0",
"expo-camera": "~12.3.0",
"expo-constants": "~13.2.4",
"expo-dev-client": "1.3.1",
"expo-device": "~4.3.0",
"expo-image-loader": "~3.2.0",
"expo-image-manipulator": "~10.4.0",
"expo-image-picker": "~13.3.1",
"expo-keep-awake": "~10.2.0",
"expo-linear-gradient": "~11.4.0",
"expo-local-authentication": "~12.3.0",
"expo-media-library": "~14.2.0",
"expo-modules-autolinking": "~0.10.1",
"expo-notifications": "~0.16.1",
"expo-screen-capture": "~4.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-system-ui": "~1.3.0",
"expo-task-manager": "~10.3.0",
"expo-updates": "~0.14.6",
"expo-web-browser": "~11.0.0",
"firebase": "^9.10.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-agora": "^3.7.1",
"react-native-bouncy-checkbox": "^3.0.4",
"react-native-calendars": "^1.1289.0",
"react-native-date-picker": "^4.2.5",
"react-native-dotenv": "^3.3.1",
"react-native-element-dropdown": "^2.3.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-gifted-chat": "^1.0.4",
"react-native-paper": "^4.12.5",
"react-native-progress": "^5.0.0",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "~3.15.0",
"react-native-svg": "12.3.0",
"react-native-toast-message": "^2.1.5",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7",
"react-native-webview": "11.23.0",
"react-redux": "^8.0.4",
"redux": "^4.2.0",
"redux-saga": "^1.2.1",
"redux-thunk": "^2.4.1",
"sentry-expo": "~5.0.0"
},
"devDependencies": {
"#babel/core": "^7.18.6",
"#types/react": "~18.0.0",
"#types/react-dom": "~18.0.0",
"#types/react-native": "~0.69.1",
"#types/react-redux": "^7.1.24",
"expo-module-scripts": "^2.1.1",
"jest": "^26.6.3",
"jest-expo": "^46.0.0",
"react-test-renderer": "^18.2.0",
"remote-redux-devtools": "^0.5.16",
"typescript": "^4.8.4"
},
"resolutions": {
"standard-version-expo/**/#expo/config-plugins": "4.1.0",
"#types/react": "~18.0.0",
"#types/react-dom": "~18.0.0",
"#types/react-native": "~0.69.1"
},
"private": true,
"name": "hammashelppi-app",
"version": "2.0.0"
}
app.json
{
"expo": {
"name": "Hammashelppi",
"slug": "hammashelppi",
"version": "2.0.0",
"orientation": "portrait",
"icon": "./images/HH_Logo.png",
"splash": {
"image": "./images/HH_splash_image.png",
"resizeMode": "contain",
"backgroundColor": "#107CA2"
},
"userInterfaceStyle": "light",
"developmentClient": {
"silentLaunch": true
},
"packagerOpts": {
"config": "metro.config.js",
"sourceExts": [
"expo.ts",
"expo.tsx",
"expo.js",
"expo.jsx",
"ts",
"tsx",
"js",
"jsx",
"json",
"wasm",
"svg"
]
},
"updates": {
"fallbackToCacheTimeout": 300000,
"enabled": true,
"url": "https://u.expo.dev/****"
},
"assetBundlePatterns": ["**/*"],
"web": {
"favicon": "./images/favicon.png"
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "hammashelppi",
"project": "hammashelppi",
"authToken": "***"
}
}
]
},
"plugins": [
[
"#stripe/stripe-react-native",
{
"merchantIdentifier": "***",
"enableGooglePay": true
}
],
[
"expo-image-picker",
{
"photosPermission": "Allow Hammashelppi to access your gallery.",
"cameraPermission": "Allow Hammashelppi to access your camera."
}
],
["expo-camera"],
[
"expo-notifications",
{
"icon": "./images/HH_android_notifications_white.png",
"color": "#107CA2",
"mode": "production"
}
],
"sentry-expo",
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 33,
"targetSdkVersion": 31,
"buildToolsVersion": "30.0.2",
"kotlinVersion": "1.7.10"
}
}
]
],
"android": {
"icon": "./images/HH_android_logo_old.png",
"googleServicesFile": "./google-services.json",
"adaptiveIcon": {
"foregroundImage": "./images/HH_android_logo.png",
"backgroundColor": "#107CA2"
},
"package": "***",
"versionCode": 15,
"permissions": [
"NOTIFICATIONS",
"CAMERA",
"READ_EXTERNAL_STORAGE",
"RECORD_AUDIO",
"android.permission.RECORD_AUDIO",
"android.permission.CAMERA"
],
"useNextNotificationsApi": true
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "***",
"infoPlist": {
"NSFaceIDUsageDescription": "Face ID is used for authentication",
"UIBackgroundModes": ["fetch", "remote-notification"]
},
"buildNumber": "15",
"googleServicesFile": "./GoogleService-Info.plist"
},
"runtimeVersion": "2.0.0",
"extra": {
"eas": {
"projectId": "***"
}
}
}
}
eas.json
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
},
"development-android": {
"extends": "development",
"android": {
"buildType": "apk",
"gradleCommand": ":app:assembleRelease"
}
},
"development-ios": {
"extends": "development",
"ios": {
"enterpriseProvisioning": "universal"
},
"cache": {
"key": "18999"
}
},
"preview-android": {
"extends": "development",
"channel": "preview-android",
"developmentClient": false,
"android": {
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease"
}
},
"preview-ios": {
"extends": "development",
"channel": "preview-ios",
"developmentClient": false,
"ios": {
"enterpriseProvisioning": "universal",
"image": "latest"
},
"cache": {
"key": "18999"
}
},
"production-android": {
"extends": "development",
"distribution": "store",
"channel": "production-android",
"developmentClient": false
},
"production-ios": {
"extends": "development",
"distribution": "store",
"channel": "production-ios",
"developmentClient": false
}
},
"submit": {}
}
the problem is not in your project, the resource with the boost library is not available
https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
If your kotlin version is "1.7.20"
Downgrading it to "1.6.0" in android/build.gradle helps
example : kotlin_version = "1.6.0"
Related
I'm trying to release my App on GooglePlay but I get this error message , Apparently my Expo App is targeting Api level 30 , and I need to change it to target Api level 31.
I tried installing BuildProperties by doing an expo install expo-build-properties
and trying to set target sdk version in the plugins but didnt work
Screenshot
My package.json
{
"name": "klearners",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#react-native-async-storage/async-storage": "^1.17.6",
"#react-navigation/bottom-tabs": "^6.3.1",
"#react-navigation/native": "^6.0.10",
"#react-navigation/native-stack": "^6.6.2",
"expo": "~44.0.0",
"expo-ads-admob": "~12.0.0",
"expo-build-properties": "^0.3.0",
"expo-status-bar": "~1.2.0",
"radio-buttons-react-native": "^1.0.4",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-chart-kit": "^6.12.0",
"react-native-confetti-cannon": "^1.5.2",
"react-native-countdown-circle-timer": "^3.0.9",
"react-native-radio-buttons-group": "^2.2.11",
"react-native-react-native-quiz-single-choice": "^1.0.3",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-simple-radio-button": "^2.7.4",
"react-native-svg": "^12.3.0",
"react-native-tts": "^4.1.0",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "^0.17.1",
"react-native-webview": "^11.23.0",
"react-translate-json": "^2.1.0",
"react-youtube": "^9.0.1",
"styled-components": "^5.3.5"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
app.json
{
"expo": {
"name": "AppName",
"slug": "AppName",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/logo.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#5e9bff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"config": {
"googleMobileAdsAppId": "ca-app-pub-3*******************"
},
"package": "com.name.AppName"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "ca****-****-****-****-**************"
}
},
"plugins": [
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
},
"ios": {
"deploymentTarget": "13.0"
}
}
]
]
}
}
eas.json
{
"build": {
"preview": {
"android": {
}
},
"preview2": {
"android": {
"gradleCommand": ":app:assembleRelease"
}
},
"preview3": {
"developmentClient": true
},
"production": {}
}
}
you can use expo-upgrade in your project delete node_modules and run yarn or npm install again
expo-upgrade
//Delete node_modules
yarn //Or npm i
so the problem is after signing in with Google through expo-auth-session, the device prompted a question and asked me to choose between two apps (both are the same app). If I choose the one on the left it will work fine, but choosing the one on the right will lead to a broken app.
What's the problem? and how to solve this issue?
Here's my app.json
{
"expo": {
"owner": "TEST",
"name": "TEST",
"description": "TESTING APP",
"slug": "test-app",
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/something-icon.png",
"appScheme": "com.test.app",
"scheme": "com.test.app",
"userInterfaceStyle": "automatic",
"currentFullName": "#user/test-app",
"originalFullName": "#user/test-app",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/code-here"
},
"assetBundlePatterns": ["*/"],
"ios": {
"buildNumber": "1",
"supportsTablet": true,
"bundleIdentifier": "com.test.app"
},
"android": {
"icon": "./assets/images/icon.png",
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./assets/icon-foreground.png",
"backgroundColor": "#0D0125"
},
"package": "com.test.app"
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"plugins": [
[
"expo-image-picker",
{
"photosPermission": "The app accesses your photos to let you upload into geekzwolf arena"
}
]
],
"extra": {
"eas": {
"projectId": "testProjectId"
},
"apiArena1": "http://localhost:3000/test",
"apiArena": "https://test.app.com/test"
},
"runtimeVersion": {
"policy": "sdkVersion"
}
}
}
Here's my package.json
{
"name": "test-app",
"version": "1.0.0",
"scripts": {
"start": "expo start ",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll",
"postinstall": "patch-package"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#ethersproject/shims": "^5.7.0",
"#expo/vector-icons": "^13.0.0",
"#gorhom/bottom-sheet": "^4",
"#react-native-clipboard/clipboard": "^1.11.0",
"#react-native-community/datetimepicker": "6.2.0",
"#react-navigation/bottom-tabs": "^6.0.5",
"#react-navigation/material-top-tabs": "^6.2.3",
"#react-navigation/native": "^6.0.2",
"#react-navigation/native-stack": "^6.1.0",
"#react-navigation/stack": "^6.2.3",
"#types/react-native-dotenv": "^0.2.0",
"axios": "^0.27.2",
"axios-auth-refresh": "^3.3.3",
"countries-list": "^2.6.1",
"date-format": "^4.0.13",
"ethers": "^5.7.0",
"expo": "~46.0.9",
"expo-application": "^4.2.2",
"expo-asset": "~8.6.1",
"expo-app-auth": "~11.1.0",
"expo-auth-session": "~3.7.1",
"expo-blur": "~11.2.0",
"expo-constants": "~13.2.4",
"expo-image-manipulator": "~10.4.0",
"expo-image-picker": "~13.3.1",
"expo-linear-gradient": "^11.4.0",
"expo-linking": "~3.2.2",
"expo-random": "~12.3.0",
"expo-secure-store": "~11.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-system-ui": "~1.3.0",
"expo-web-browser": "~11.0.0",
"lottie-react-native": "5.1.3",
"nativewind": "^2.0.1",
"patch-package": "^6.4.7",
"prop-types": "^15.8.1",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-collapsible": "^1.6.0",
"react-native-country-flag": "^1.1.6",
"react-native-dotenv": "^3.3.1",
"react-native-gesture-handler": "~2.5.0",
"react-native-get-random-values": "^1.8.0",
"react-native-modal": "^13.0.1",
"react-native-pager-view": "5.4.24",
"react-native-paper": "^4.12.4",
"react-native-raw-bottom-sheet": "^2.2.0",
"react-native-reanimated": "~2.9.1",
"react-native-reanimated-carousel": "^3.0.4",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-simple-accordion": "^1.17.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "12.3.0",
"react-native-tab-view": "^3.1.1",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7",
"react-native-webview": "11.23.0",
"semver": "^7.3.8",
"timediff": "^1.1.1",
"twrnc": "^3.4.0"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#ethersproject/shims": "^5.7.0",
"#types/react": "~18.0.14",
"#types/react-native": "~0.69.1",
"#typescript-eslint/eslint-plugin": "^5.33.1",
"#typescript-eslint/parser": "^5.33.1",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^8.22.0",
"jest": "^26.6.3",
"jest-expo": "~44.0.1",
"react-test-renderer": "18.0.0",
"tailwindcss": "^3.1.8",
"typescript": "~4.3.5"
},
"private": true,
"prettier": {
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"insertPragma": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"proseWrap": "preserve",
"tabWidth": 2,
"requirePragma": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
}
}
The problem in my case was, I used both expo-app-auth and expo-auth-session. According to this post, it will create duplicated schemes, hence the two apps. In addition to that, expo-app-auth is deprecated in favour of expo-auth-session, so there's no reason to have expo-app-auth in package.json anymore (unless there's specific case where you need it).
This has been working great for the last couple of years, but we just upgraded a slew of libraries and now eslint, when we run our app, is not referring to our eslintrc file. It's throwing errors for rules that we have either disabled or set to warning. I can type junk into the eslintrc file and nothing errors on build.
The ESLint extension in VSCode does recognize it and running eslint CLI works as expected. When running npm run start or npm run deploy-build, it seems to ignore the eslintrc file.
.eslintrc.js removed many rules for brevity
module.exports = {
"env": {
"browser": true,
"jest": true
},
"extends": "airbnb",
"globals": {
"_satellite": true
},
"parser": "babel-eslint",
"rules": {
"comma-dangle": 0,
"eol-last": 0,
...
"jsx-a11y/anchor-is-valid": [
2,
{
"components": [
"Link"
],
"specialLink": [
"to"
]
}
],
...
"react/jsx-curly-newline": 0, // this is one rule that I'm specifically chasing
...
},
"settings": {
"import/resolver": {
"node": {
"paths": [
"src"
]
}
}
}
}
craco-config.js
const path = require('path');
const { ESLINT_MODES } = require('#craco/craco');
const StyleLintPlugin = require('stylelint-webpack-plugin');
module.exports = {
jest: {
configure: {
setupFiles: [
'jest-localstorage-mock',
'<rootDir>/jest/global_mocks.js',
'<rootDir>/jest/global_variables.js'
],
testResultsProcessor: 'jest-sonar-reporter',
snapshotSerializers: [
'enzyme-to-json/serializer'
],
collectCoverageFrom: [
'src/**/*.js',
'!src/registerServiceWorker.js',
'!src/**/*.stories.js',
'!src/**/*.styles.js'
],
coverageThreshold: {
global: {
branches: 60,
functions: 70,
lines: 80,
statements: 1
}
},
clearMocks: true
}
},
eslint: {
mode: ESLINT_MODES.file
},
webpack: {
plugins: [
new StyleLintPlugin({
configBasedir: __dirname,
context: path.resolve(__dirname, 'src'),
files: ['**/*.scss']
})
]
}
};
local environment
EXTEND_ESLINT=true
REACT_APP_ENV=local
...
package.json
{
"name": "search",
"version": "1.0.0",
"private": true,
"dependencies": {
"#datadog/browser-rum": "^1.12.8",
"#okta/okta-react": "^3.0.4",
"axios": "^0.18.1",
"connected-react-router": "^6.7.0",
"core-js": "^3.6.5",
"debounce": "^1.2.0",
"eslint-plugin-react-hooks": "^4.1.0",
"fast-text-encoding": "^1.0.2",
"focus-within-polyfill": "^5.0.4",
"history": "^4.10.0",
"jshashes": "^1.0.7",
"lodash.groupby": "^4.6.0",
"lodash.sortby": "^4.7.0",
"moment": "^2.24.0",
"moment-timezone": "^0.5.28",
"prop-types": "^15.6.2",
"qs": "^6.5.2",
"react": "^16.13.0",
"react-app-polyfill": "^1.0.6",
"react-click-outside": "^3.0.1",
"react-cursor-position": "^3.0.3",
"react-dom": "^16.13.0",
"react-easy-swipe": "0.0.17",
"react-flexbox-grid": "^2.1.2",
"react-html-parser": "^2.0.2",
"react-inlinesvg": "^1.1.5",
"react-lazyload": "^2.6.2",
"react-number-format": "^4.0.5",
"react-redux": "^7.2.0",
"react-router": "^5.1.0",
"react-router-dom": "^5.1.0",
"react-scripts": "^3.4.1",
"react-slick": "^0.23.1",
"react-sticky-el": "^1.0.20",
"react-toastify": "^4.2.0",
"react-transition-group": "^4.4.0",
"reactjs-popup": "^1.5.0",
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.8",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"rxjs": "^6.5.5",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.83.0",
"slick-carousel": "^1.8.1",
"smoothscroll-polyfill": "^0.4.3",
"styled-components": "^5.1.1",
"use-clipboard-copy": "^0.1.1",
"uuid": "^7.0.2"
},
"devDependencies": {
"#craco/craco": "^5.6.4",
"#storybook/addon-actions": "^5.0.5",
"#storybook/addon-knobs": "^5.0.6",
"#storybook/addon-links": "^5.0.5",
"#storybook/addons": "^5.0.5",
"#storybook/react": "^5.0.5",
"#testing-library/react": "^10.4.7",
"cross-env": "^7.0.2",
"env-cmd": "^10.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.5.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"jest-environment-jsdom": "^24.9.0",
"jest-environment-node": "^24.9.0",
"jest-localstorage-mock": "^2.4.0",
"jest-sonar-reporter": "^2.0.0",
"jest-styled-components": "^7.0.2",
"libxmljs": "^0.19.7",
"node-sass-chokidar": "^1.5.0",
"npm-link-shared": "^0.5.6",
"redux-mock-store": "^1.5.3",
"stylelint": "^9.10.1",
"stylelint-config-sass-guidelines": "^5.3.0",
"stylelint-webpack-plugin": "^0.10.5"
},
"scripts": {
"localxf": "cross-env NODE_PATH=src env-cmd -f ./env/localxf craco start",
"test": "cross-env NODE_PATH=src craco test --env=jsdom",
"test:debug": "cross-env NODE_PATH=src craco test --runInBand --no-cache --env=jsdom",
"storybook": "cross-env NODE_PATH=src env-cmd -f ./env/local start-storybook -p 6006",
"build-storybook": "build-storybook",
"deploy-build": "cross-env NODE_PATH=src env-cmd -f ./env/deploy-build craco build",
"start": "cross-env NODE_PATH=src env-cmd -f ./env/local craco start --no-cache"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"ie 11",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"ie 11"
]
}
}
I suspect there's a library above I have to update but I'm not sure what else to update!
This seems to be a viable workaround:
eslint: {
mode: ESLINT_MODES.extends,
configure: () => {
// Workaround for broken ESLINT_MODES.file mode
return require('./.eslintrc')
}
},
I used the custom font on react-native expo project.
It works well on the expo platform with an android emulator.
But After I built my project as APK file, it does not show all the text as my custom font.
I followed the tutorial like this (https://docs.expo.io/versions/latest/guides/using-custom-fonts/) but it doesn't work.
Is there any solution to work on android?
I tried to use the custom font like this.
class App extends Component {
state = {
fontLoaded: false
};
async componentDidMount() {
await Font.loadAsync({
"Antonio": require("./assets/fonts/Antonio-Light.ttf"),
"Antonio-Bold": require("./assets/fonts/Antonio-Bold.ttf")
});
this.setState({ fontLoaded: true });
}
render() {
const { fontLoaded } = this.state;
if (!fontLoaded)
return (
<Text>Loading.....</Text>
);
...........
This is my package.json file.
...
"dependencies": {
"#expo/vector-icons": "^9.0.0",
"angle-normals": "^1.0.0",
"art": "^0.10.1",
"bunny": "^1.0.1",
"expo": "^34.0.3",
"expo-asset": "latest",
"expo-asset-utils": "^1.1.1",
"expo-font": "^6.0.1",
"expo-gl": "~5.0.1",
"expo-pixi": "^1.2.0",
"expokit": "^32.0.3",
"gl-mat4": "^1.1.4",
"gl-react": "^3.13.0",
"gl-react-expo": "^3.16.3",
"lodash": "^4.17.11",
"matter-js": "^0.13.0",
"native-base": "^2.10.0",
"prop-types": "^15.6.2",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-motion": "^0.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-animatable": "^1.2.2",
"react-native-donkey-kong": "^0.5.1",
"react-native-extended-stylesheet": "git+https://github.com/bberak/react-native-extended-stylesheet.git",
"react-native-game-engine": "^0.10.1",
"react-native-gesture-handler": "~1.2.1",
"react-native-paper": "2.1.3",
"react-native-responsive-screen": "^1.3.0",
"react-native-svg": "^9.11.1",
"react-native-web": "^0.11.2",
"react-navigation": "^3.2.1",
"react-navigation-redux-helpers": "^2.0.9",
"react-redux": "^6.0.0",
"react-style-proptype": "^3.2.2",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"regl": "^1.3.0"
},
...
This is my app.json file.
{
"expo": {
"name": "Zenduja",
"slug": "Zenduja-Pro",
"privacy": "unlisted",
"sdkVersion": "33.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#222222"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"assets/fonts/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.aaa.aaa"
},
"packagerOpts": {
"assetExts": [
"ttf",
"mp4",
"otf",
"xml"
]
},
}
}
Please help me.
Thanks.
Updated question.
This is my expo snack loading font project.
https://snack.expo.io/#angelsinej/font-loading
Add to app.json like:
"assetBundlePatterns":["assets/fonts/*"]
Update to sdk 34 and related react-native package.
and recompile apk
Just started using gulp not long ago, everything works fine before this when I'm stuck at this error. I've tried
//gulpfile.js
var gulp = require('gulp'),
browserify = require('browserify'),
source = require('vinyl-source-stream');
// Browserify task
gulp.task('browserify', function() {
return browserify(['app/scripts/app.js'], {debug:true})
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest('dist/scripts'))
});
Error when running gulp browserify
events.js:141
throw er; // Unhandled 'error' event
^
SyntaxError: Unterminated string constant
Where does this syntax error point to? I've read up some articles on the errors in package.json file too.
"devDependencies": {
"browserify": "^13.0.0",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-clean-css": "^2.0.4",
"gulp-connect": "^3.2.1",
"gulp-imagemin": "^2.4.0",
"gulp-less": "^3.0.5",
"gulp-plumber": "^1.1.0",
"gulp-uglify": "^1.5.3",
"vinyl-source-stream": "^1.1.0"
},
"dependencies": {
"angular": "^1.5.3",
"imagemin-pngquant": "^4.2.2"
}
//browserify package.json
{
"name": "browserify",
"version": "13.0.0",
"description": "browser-side require() the node way",
"main": "index.js",
"bin": {
"browserify": "bin/cmd.js"
},
"repository": {
"type": "git",
"url": "git+ssh://git#github.com/substack/node-browserify.git"
},
"keywords": [
"browser",
"require",
"commonjs",
"commonj-esque",
"bundle",
"npm",
"javascript"
],
"dependencies": {
"JSONStream": "^1.0.3",
"assert": "~1.3.0",
"browser-pack": "^6.0.1",
"browser-resolve": "^1.11.0",
"browserify-zlib": "~0.1.2",
"buffer": "^4.1.0",
"concat-stream": "~1.5.1",
"console-browserify": "^1.1.0",
"constants-browserify": "~1.0.0",
"crypto-browserify": "^3.0.0",
"defined": "^1.0.0",
"deps-sort": "^2.0.0",
"domain-browser": "~1.1.0",
"duplexer2": "~0.1.2",
"events": "~1.1.0",
"glob": "^5.0.15",
"has": "^1.0.0",
"htmlescape": "^1.1.0",
"stream-http": "^2.0.0",
"https-browserify": "~0.0.0",
"inherits": "~2.0.1",
"insert-module-globals": "^7.0.0",
"isarray": "0.0.1",
"labeled-stream-splicer": "^2.0.0",
"module-deps": "^4.0.2",
"os-browserify": "~0.1.1",
"parents": "^1.0.1",
"path-browserify": "~0.0.0",
"process": "~0.11.0",
"punycode": "^1.3.2",
"querystring-es3": "~0.2.0",
"read-only-stream": "^2.0.0",
"readable-stream": "^2.0.2",
"resolve": "^1.1.4",
"shasum": "^1.0.0",
"shell-quote": "^1.4.3",
"stream-browserify": "^2.0.0",
"string_decoder": "~0.10.0",
"subarg": "^1.0.0",
"syntax-error": "^1.1.1",
"through2": "^2.0.0",
"timers-browserify": "^1.0.1",
"tty-browserify": "~0.0.0",
"url": "~0.11.0",
"util": "~0.10.1",
"vm-browserify": "~0.0.1",
"xtend": "^4.0.0"
},
"devDependencies": {
"backbone": "~0.9.2",
"browser-unpack": "^1.1.1",
"coffee-script": "~1.10.0",
"coffeeify": "~1.1.0",
"es6ify": "~0.4.8",
"isstream": "^0.1.2",
"seq": "0.3.5",
"tap": "^2.2.0",
"temp": "^0.8.1",
"through": "^2.3.4"
},
"author": {
"name": "James Halliday",
"email": "mail#substack.net",
"url": "http://substack.net"
},
"scripts": {
"test": "tap test/*.js"
},
"license": "MIT",
"gitHead": "5b82a2f1bc061cb47ff4aa7c702ed79fc20effa8",
"bugs": {
"url": "https://github.com/substack/node-browserify/issues"
},
"homepage": "https://github.com/substack/node-browserify#readme",
"_id": "browserify#13.0.0",
"_shasum": "8f223bb24ff4ee4335e6bea9671de294e43ba6a3",
"_from": "browserify#latest",
"_npmVersion": "2.14.7",
"_nodeVersion": "4.2.3",
"_npmUser": {
"name": "feross",
"email": "feross#feross.org"
},
"dist": {
"shasum": "8f223bb24ff4ee4335e6bea9671de294e43ba6a3",
"tarball": "http://registry.npmjs.org/browserify/-/browserify- 13.0.0.tgz"
},
"maintainers": [
{
"name": "domenic",
"email": "d#domenic.me"
},
{
"name": "dominictarr",
"email": "dominic.tarr#gmail.com"
},
{
"name": "feross",
"email": "feross#feross.org"
},
{
"name": "jmm",
"email": "npm-public#jessemccarthy.net"
},
{
"name": "mafintosh",
"email": "mathiasbuus#gmail.com"
},
{
"name": "maxogden",
"email": "max#maxogden.com"
},
{
"name": "mellowmelon",
"email": "palmermebane#gmail.com"
},
{
"name": "substack",
"email": "substack#gmail.com"
},
{
"name": "terinjokes",
"email": "terinjokes#gmail.com"
},
{
"name": "thlorenz",
"email": "thlorenz#gmx.de"
},
{
"name": "zertosh",
"email": "zertosh#gmail.com"
}
],
"directories": {},
"_resolved": "https://registry.npmjs.org/browserify/-/browserify-13.0.0.tgz",
"readme": "ERROR: No README data found!"
}
I manage to run this without error by adding
{
"devDependencies": {
"browserify": "^13.0.0",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-clean-css": "^2.0.4",
"gulp-connect": "^3.2.1",
"gulp-imagemin": "^2.4.0",
"gulp-less": "^3.0.5",
"gulp-plumber": "^1.1.0",
"gulp-uglify": "^1.5.3",
"vinyl-source-stream": "^1.1.0"
},
"dependencies": {
"angular": "^1.5.3",
"imagemin-pngquant": "^4.2.2"
},
//Tells browserify to use browserify-shim
"browserify": {
"transform": [ "browserify-shim" ]
},
"browserify-shim": {
"./app/scripts/app.js": "$"
}
}