I developed an app using the managed expo workflow, however it's required to use a native apis (in this case WebRTC) and therefore I ran expo eject to switch to the bare workflow. However, I am getting weird errors when I try to run the app with react-native run-ios:
info Found Xcode workspace "myproject.xcworkspace"
info Launching iPhone 12 (iOS 15.4)
info Building (using "xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=4241C8A8-2BAC-45DD-A4A6-BBFC23A6C709")
(node:5087) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening myproject.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=4241C8A8-2BAC-45DD-A4A6-BBFC23A6C709
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: 5e9a8a54370fc02b46865b3cdf7c6f3f
Build description path: /Users/TheCorsError/Library/Developer/Xcode/DerivedData/myproject-urtidjsdfafeadfdcoawhoyie/Build/Intermediates.noindex/XCBuildData/5e9a8a54370fc02b46865b3cdf7c6f3f-desc.xcbuild
note: Build preparation complete
note: Building targets in dependency order
PhaseScriptExecution Start\ Packager /Users/TheCorsError/Library/Developer/Xcode/DerivedData/myproject-urtidjsdfafeadfdcoawhoyie/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Script-FD10A7F022414F080027D42C.sh (in target 'myproject' from project 'myproject')
cd /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios
/bin/sh -c /Users/TheCorsError/Library/Developer/Xcode/DerivedData/myproject-urtidjsdfafeadfdcoawhoyie/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Script-FD10A7F022414F080027D42C.sh
The file /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios/Vorlage/mobile/source-expo/node_modules/react-native/scripts/launchPackager.command does not exist.
Can't start packager automatically
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'myproject' from project 'myproject')
error: no such module 'ExpoModulesCore'
import ExpoModulesCore
^
Command EmitSwiftModule failed with a nonzero exit code
error: emit-module command failed with exit code 1 (use -v to see invocation)
objc[5100]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1049784f8). One of the two will be used. Which one is undefined.
objc[5100]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978548). One of the two will be used. Which one is undefined.
objc[5100]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978598). One of the two will be used. Which one is undefined.
objc[5100]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1049785e8). One of the two will be used. Which one is undefined.
objc[5100]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978638). One of the two will be used. Which one is undefined.
objc[5100]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x20ae6a040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978688). One of the two will be used. Which one is undefined.
2022-03-19 15:49:45.188 xcodebuild[5100:60119] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-03-19 15:49:45.188 xcodebuild[5100:60119] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios/myproject/noop-file.swift (in target 'myproject' from project 'myproject')
CompileSwift normal x86_64 /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios/Pods/Target\ Support\ Files/Pods-myproject/ExpoModulesProvider.swift (in target 'myproject' from project 'myproject')
EmitSwiftModule normal x86_64 (in target 'myproject' from project 'myproject')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'myproject' from project 'myproject')
(4 failures)
info Run CLI with --verbose flag for more details.
Note that some words may be changed due to privacy concerns. These are my configs:
// app.json
{
"expo": {
"name": "myproject",
"slug": "myproject",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.myproject.app"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.myproject.app"
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config')
module.exports = (async () => {
const config = await getDefaultConfig(__dirname)
const { transformer, resolver } = config
config.transformer = {
...transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer')
}
config.resolver = {
...resolver,
assetExts: resolver.assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...resolver.sourceExts, 'svg', 'cjs', 'mjs']
}
return config
})()
//package.json
{
"scripts": {
"start": "expo start --dev-client",
"dev": "expo start && i",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#apollo/client": "^3.4.7",
"#mdi/js": "^6.5.95",
"#ptomasroos/react-native-multi-slider": "^2.2.2",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/datetimepicker": "4.0.0",
"#react-native-community/masked-view": "^0.1.11",
"#react-native-picker/picker": "2.2.1",
"#react-navigation/bottom-tabs": "^5.11.11",
"#react-navigation/native": "^5.9.4",
"#react-navigation/stack": "^5.14.5",
"#urql/core": "^2.4.3",
"#urql/exchange-retry": "^0.3.2",
"axios": "^0.21.1",
"babel-loader": "^8.2.3",
"eas-cli": "^0.47.0",
"expo": "^44.0.0",
"expo-app-loading": "~1.3.0",
"expo-cli": "^5.1.2",
"expo-dev-client": "~0.8.4",
"expo-font": "~10.0.4",
"expo-google-app-auth": "~8.3.0",
"expo-google-sign-in": "~10.1.0",
"expo-linear-gradient": "~11.0.3",
"expo-localization": "~12.0.0",
"expo-secure-store": "~11.1.0",
"expo-sharing": "~10.1.0",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"expo-updates": "~0.11.6",
"graphql": "^15.5.1",
"i18next": "^20.2.2",
"iterall": "^1.3.0",
"moment": "^2.29.1",
"prop-types": "^15.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-i18next": "^11.8.15",
"react-native": "0.64.3",
"react-native-action-button": "^2.8.5",
"react-native-animatable": "^1.3.3",
"react-native-appearance": "~0.3.3",
"react-native-breadcrumb": "^1.2.0",
"react-native-breadcrumb-navigation": "^1.0.4",
"react-native-calendars": "^1.1264.0",
"react-native-camera": "^3.43.8",
"react-native-chart-kit": "^6.11.0",
"react-native-draggable": "^3.3.0",
"react-native-dropdown-picker": "^5.3.0",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "~2.1.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^2.2.0",
"react-native-maps": "0.29.4",
"react-native-modal": "^11.10.0",
"react-native-modal-datetime-picker": "^9.2.3",
"react-native-pager-view": "5.4.9",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "12.1.1",
"react-native-svg-transformer": "^1.0.0",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.0.1",
"react-native-touchable-scale": "^2.1.2",
"react-native-vector-icons": "^9.0.0",
"react-native-web": "0.17.1",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"rn-placeholder": "^3.0.3",
"rn-range-slider": "^2.0.4",
"subscriptions-transport-ws": "^0.11.0",
"url": "^0.11.0"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/react-native": "~0.64.12",
"typescript": "~4.3.5"
},
"private": true,
"name": "source-expo",
"version": "1.0.0"
}
// react-native info
System:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Pro
Memory: 120.25 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Watchman: 2022.03.14.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
//expo doctor
🎉 Didn't find any issues with the project!
//Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('#react-native-community/cli-platform-ios/package.json')"`), "native_modules")
platform :ios, '12.0'
require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
target 'myproject' do
use_expo_modules!
config = use_native_modules!
pod 'expo-dev-launcher', path: '../node_modules/expo-dev-launcher', :configurations => :debug
pod 'expo-dev-menu', path: '../node_modules/expo-dev-menu', :configurations => :debug
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
)
# Uncomment to opt-in to using Flipper
#
# if !ENV['CI']
# use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
# end
post_install do |installer|
react_native_post_install(installer)
# Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
# Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
installer.pods_project.targets.each do |target|
if (target.name&.eql?('FBReactNativeSpec'))
target.build_phases.each do |build_phase|
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
target.build_phases.move(build_phase, 0)
end
end
end
end
end
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
end
Related
So I've been working on a React Native project, I'm on a Mac and when I run my apk file generated by the command ./gradlew assembleRelease and install it on my Google Pixel 4a I try to open the app and it instantly crashes and closes. However, when I run it in the emulator via command react-native run-android it works as expected. During the build, installation and even opening the app on my actual device it never gives a single error. Nothing has changed to my knowledge since the last time I ran the build command and it was working before so I'm lost and confused as to why this is happening. This also my first react-native project so maybe being a noob I'm missing something very obvious. Also iOS has absolutely no issues, any feedback or tips would be greatly appreciated. Thanks
My build.gradle file:
buildscript {
ext {
googlePlayServicesLocationVersion = "17.0.0" // Or higher.
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
appCompatVersion = "1.1.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath 'com.google.gms:google-services:4.3.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven {
// react-native-background-fetch
url("${project(':react-native-background-fetch').projectDir}/libs")
}
maven {
// Required for react-native-background-geolocation
url("${project(':react-native-background-geolocation').projectDir}/libs")
}
maven {
// Required for zoho chat widget
url("https://maven.zohodl.com/")
}
maven {
// Required for react-native-background-fetch
url("${project(':react-native-background-fetch').projectDir}/libs")
}
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = "mapbox"
// Use the secret token you stored in gradle.properties as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
package.json
{
"name": "NAME",
"version": "1.2.8",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"
},
"dependencies": {
"#homee/react-native-mapbox-navigation": "^1.0.5",
"#react-native-async-storage/async-storage": "^1.15.5",
"#react-native-community/checkbox": "^0.5.8",
"#react-native-firebase/app": "11.5.0",
"#react-native-firebase/auth": "11.5.0",
"#react-native-firebase/firestore": "^11.5.0",
"#react-native-picker/picker": "^1.9.12",
"#react-navigation/bottom-tabs": "^6.0.0-next.2",
"#react-navigation/drawer": "^6.0.0-next.2",
"#react-navigation/native": "^6.0.0-next.1",
"#react-navigation/stack": "^6.0.0-next.6",
"axios": "^0.21.1",
"expo-web-browser": "^9.0.0",
"firebase": "^7.24.0",
"firebase-tools": "^8.16.2",
"mobx": "^6.1.8",
"mobx-react-lite": "^3.2.0",
"mobx-state-tree": "^5.0.1",
"moment": "^2.29.1",
"mst-persist": "^0.1.3",
"react": "17.0.1",
"react-native": "0.64.0",
"react-native-background-fetch": "^4.0.1",
"react-native-background-geolocation": "^4.0.1",
"react-native-datepicker": "^1.7.2",
"react-native-dropdown-picker": "^4.0.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-modalize": "^2.0.8",
"react-native-paper": "^4.7.2",
"react-native-portalize": "^1.0.7",
"react-native-reanimated": "^2.0.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^2.18.1",
"react-native-unimodules": "^0.12.0",
"react-native-vector-icons": "^8.1.0",
"react-native-webview": "^11.3.1",
"react-native-zohosalesiq-mobilisten": "^2.0.0",
"styled-components": "^5.2.1"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.14.0",
"#react-native-community/eslint-config": "^2.0.0",
"#types/jest": "^26.0.20",
"#types/react": "^17.0.3",
"#types/react-native": "^0.63.51",
"#types/react-test-renderer": "^17.0.1",
"babel-jest": "^26.6.3",
"eslint": "7.14.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"mobx-flipper": "^1.1.2",
"react-native-flipper": "^0.81.0",
"react-test-renderer": "17.0.1",
"typescript": "^4.2.3"
},
"jest": {
"preset": "react-native"
},
"prettier": {
"arrowParens": "always",
"printWidth": 100,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
}
I want to create an apk . i am using expo bare project and i am using this command to create the apk for android
cd android && ./gradlew assembleRelease
and i am getting this error every time when i run the command .
here is the error
I have also tried to create the apk for a boilerplate app and that's working fine
but i am getting the error from this one i was using this command before
expo build:android
but by using this command by has a large size so i want to decrease its size that's why i am using
cd android && ./gradlew assembleRelease
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':expo-permissions:compileReleaseKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
Package.json
{
"main": "index.js",
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"#expo-google-fonts/montserrat": "^0.1.0",
"#expo-google-fonts/oswald": "^0.1.0",
"#expo-google-fonts/playfair-display": "^0.1.0",
"#react-native-community/cli-platform-ios": "^4.13.0",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-community/netinfo": "^5.9.2",
"#react-native-community/slider": "^3.0.0",
"#react-navigation/bottom-tabs": "^5.11.1",
"#react-navigation/drawer": "^5.9.0",
"#react-navigation/material-top-tabs": "^5.3.10",
"#react-navigation/native": "^5.6.1",
"#react-navigation/stack": "^5.6.2",
"#unimodules/core": "~6.0.0",
"base64-arraybuffer": "^0.2.0",
"expo": "~40.0.0",
"expo-av": "~8.7.0",
"expo-camera": "~9.1.0",
"expo-constants": "~9.3.3",
"expo-file-system": "~9.3.0",
"expo-image-picker": "~9.2.0",
"expo-linear-gradient": "^8.4.0",
"expo-localization": "~9.1.0",
"expo-location": "~10.0.0",
"expo-media-library": "~10.0.0",
"expo-splash-screen": "~0.8.0",
"expo-status-bar": "~1.0.3",
"expo-updates": "~0.4.0",
"i18n-js": "^3.8.0",
"import": "^0.0.6",
"localstorage-polyfill": "^1.0.1",
"moment": "^2.29.1",
"native-base": "^2.13.14",
"query-string": "^6.13.7",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "~0.63.4",
"react-native-deck-swiper": "^2.0.5",
"react-native-dropdown-picker": "^3.7.6",
"react-native-easy-grid": "^0.2.2",
"react-native-gesture-handler": "~1.8.0",
"react-native-keyboard-aware-scroll-view": "^0.9.2",
"react-native-material-menu": "^1.2.0",
"react-native-paper": "^4.1.0",
"react-native-reanimated": "~1.13.0",
"react-native-responsive-fontsize": "^0.5.0",
"react-native-responsive-screen": "^1.4.1",
"react-native-safe-area-context": "~3.1.9",
"react-native-screens": "~2.15.0",
"react-native-size-matters": "^0.3.1",
"react-native-step-indicator": "^1.0.3",
"react-native-svg": "^12.1.0",
"react-native-tab-view": "^2.15.2",
"react-native-unimodules": "~0.12.0",
"react-native-web": "~0.13.12",
"react-native-webview": "^11.0.0",
"react-navigation": "^4.4.0",
"socket.io-client": "^2.3.0"
},
"devDependencies": {
"#babel/core": "~7.9.0",
"babel-jest": "~25.2.6",
"jest": "~25.2.6",
"react-test-renderer": "~16.13.1"
},
"jest": {
"preset": "react-native"
},
"private": true
}
For bare workflow, you have to exclude expo-permissions module:
android/app/build.gradle:
Replace:
addUnimodulesDependencies()
with
addUnimodulesDependencies([exclude: ['expo-permissions']])
for iOS in Podfile:
Replace:
use_unimodules!
with
use_unimodules!(exclude: ['expo-permissions'])
The solution was posted here : https://github.com/expo/expo/issues/10283
Having some trouble getting Detox setup in my React Native project.
My project configuration is as follows:
MacOS Version: 10.14.14
Xcode 10.2.1
Command Line Tools: Version 10.2.1
package.json:
{
"name": "AppName",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-preset-react-native-stage-0": "^1.0.1",
"detox": "^12.11.0",
"jest": "^23.6.0",
"jest-react-native": "^18.0.0",
"mocha": "^6.1.4",
"react-test-renderer": "16.3.1"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"devtools": "react-devtools --port 8091",
"test": "jest"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"jail-monkey": "^2.1.1",
"react": "16.3.1",
"react-devtools": "^3.2.3",
"react-native": "~0.55.2",
"react-native-camera": "1.1.4",
"react-native-device-info": "^0.22.5",
"react-native-fs": "^2.13.3",
"react-native-image-resizer": "^1.0.0",
"react-native-mail": "^3.0.7",
"react-native-maps": "^0.21.0",
"react-native-permissions": "^1.1.1",
"react-native-signature-capture": "^0.4.9",
"react-native-sortable-list": "0.0.22",
"react-native-sound": "^0.10.12",
"react-native-splash-screen": "^3.1.1",
"react-native-sqlcipher-storage": "github:axsy-dev/react-native-sqlcipher-storage",
"react-native-swipe-gestures": "^1.0.2",
"react-native-swipeout": "^2.3.6",
"react-navigation": "^2.2.4",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-thunk": "^2.2.0",
"rn-fetch-blob": "^0.10.15"
},
"rnpm": {
"assets": [
"./src/assets/fonts"
]
},
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/ProntoPOD.app",
"build": "xcodebuild -workspace ios/ProntoPOD.xcworkspace -scheme ProntoPOD -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone XR"
}
},
"test-runner": "jest"
}
}
Originally I was getting the following errors occurring after installing Jest and Detox as per the instructions in the Setup Guide:
Build system information
error: Multiple commands produce '':
1) Target 'double-conversion' (project 'React') has copy command from '/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/react-native/third-party/double-conversion-1.1.5/src/bignum-dtoa.h' to '/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/ios/build/Build/Products/Debug-iphonesimulator/include/double-conversion/bignum-dtoa.h'
2) Target 'double-conversion-tvOS' (project 'React') has copy command from '/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/react-native/third-party/double-conversion-1.1.5/src/bignum-dtoa.h' to '/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/ios/build/Build/Products/Debug-iphonesimulator/include/double-conversion/bignum-dtoa.h'
Build system information
error: Multiple commands produce '':
1) Target 'double-conversion' (project 'React'): Libtool /Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/ios/build/Build/Products/Debug-iphonesimulator/libdouble-conversion.a normal x86_64
2) Target 'double-conversion-tvOS' (project 'React'): Libtool /Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/ios/build/Build/Products/Debug-iphonesimulator/libdouble-conversion.a normal x86_64
** BUILD FAILED **
detox[64617] ERROR: [cli.js] Error: Command failed: xcodebuild -workspace ios/ProntoPOD.xcworkspace -scheme ProntoPOD -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
This was resolved by changing the Build System in XCode to the Legacy Build under Workspace Settings. The following error now appears and I am not sure how to resolve it:
Error: An error occurred while adding the reporter at path "/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/detox/runners/jest/streamlineReporter.js".Cannot find module '#jest/reporters'
at reporters.forEach (/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/TestScheduler.js:510:15)
at Array.forEach ()
at TestScheduler._addCustomReporters (/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/TestScheduler.js:497:15)
at TestScheduler._setupReporters (/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/TestScheduler.js:466:12)
at new TestScheduler (/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/TestScheduler.js:193:10)
at /Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/runJest.js:452:27
at Generator.next ()
at step (/Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/runJest.js:107:30)
at /Users/cbrobbel/ProntoProjects/prontopod/ProntoPOD/node_modules/jest/node_modules/jest-cli/build/runJest.js:118:15
at processTicksAndRejections (internal/process/task_queues.js:86:5)
detox[64758] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:android:).)*$' "e2e"
Any help would be appreciated.
Thanks!
If this is due to peer dependency, you can try npm install #jest/reporters manually since peer dependencies are not auto installed in npm 3 upwards.
Try running
npm install #jest/reporters
npm install
I have a server running on aws elastic beanstalk. It's pretty much been fine. but today when applying an update(Absolutely nothing to do with configs or versioning of modules used) which was simply adding a few words to some text in the web app (Literally the word 'dog'). The app started crashing with 502 nginx gateway errors. I assume this is because the app is not lifying. I went and reverted the change(Though I did not think I had to do so). and the problem persists.
My output when attempting to lift / start the sails app is as follows.
Failed to load helper `web/auth/validate-user-password` as a machine!
A hook (`helpers`) failed to load!
Failed to lift app: ImplementationError: Sorry, could not interpret "web/auth/validate-user-password" because its underlying implementation has a problem:
------------------------------------------------------
• The `cacheable` property is no longer supported. (Please use `sideEffects: 'cacheable' instead.)
------------------------------------------------------
If you are the maintainer of "web/auth/validate-user-password", then you can change its implementation to solve the problem above. Otherwise, please file a bug report with the maintainer, or fork your own copy and fix that.
[?] See https://sailsjs.com/support for help.
at flaverr (/var/app/current/node_modules/flaverr/index.js:77:15)
at helpBuildMachine (/var/app/current/node_modules/sails/node_modules/machine/lib/private/help-build-machine.js:127:11)
at Function.build (/var/app/current/node_modules/sails/node_modules/machine/lib/build.js:52:10)
at /var/app/current/node_modules/sails/lib/hooks/helpers/load-helpers.js:51:49
at /var/app/current/node_modules/#sailshq/lodash/lib/index.js:3228:15
at baseForOwn (/var/app/current/node_modules/#sailshq/lodash/lib/index.js:2199:14)
at /var/app/current/node_modules/#sailshq/lodash/lib/index.js:3198:18
at Function.<anonymous> (/var/app/current/node_modules/#sailshq/lodash/lib/index.js:3501:13)
at /var/app/current/node_modules/sails/lib/hooks/helpers/load-helpers.js:37:9
at helpBuildDictionary (/var/app/current/node_modules/sails/node_modules/include-all/lib/help-build-dictionary.js:135:10)
at Function.module.exports.optional (/var/app/current/node_modules/sails/node_modules/include-all/index.js:67:10)
at Hook.loadHelpers (/var/app/current/node_modules/sails/lib/hooks/helpers/load-helpers.js:21:14)
at Hook.initialize (/var/app/current/node_modules/sails/lib/hooks/helpers/index.js:28:19)
at Hook.wrapper [as initialize] (/var/app/current/node_modules/#sailshq/lodash/lib/index.js:3250:19)
at /var/app/current/node_modules/sails/lib/hooks/index.js:88:16
at /var/app/current/node_modules/async/dist/async.js:486:20
(You are seeing the above error message because no custom callback was programmatically provided to `.lift()`.)
A hook (`orm`) failed to load!
This is what I'm seeing in package.json in case it will be of help.
{
"name": "sails-xxxxxxx-seed",
"private": true,
"version": "0.0.3-147",
"description": "a Sails application",
"keywords": [],
"dependencies": {
"async": "2.0.1",
"aws-sdk": "^2.41.0",
"bcryptjs": "2.3.0",
"connect-redis": "3.3.0",
"flaverr": "^1.1.1",
"lodash": "3.10.1",
"machinepack-http": "3.1.2",
"moment-timezone": "0.5.13",
"pdfmake": "0.1.28",
"sails": "^1.0.0-32",
"sails-hook-orm": "^2.0.0-0",
"sails-hook-sockets": "^1.0.1",
"sails-mysql": "^1.0.0-13",
"sails-stdlib": "^0.7.1",
"sails.io.js": "1.1.9",
"serve-static": "1.12.3",
"socket.io-client": "1.7.3",
"socket.io-redis": "3.1.0",
"uuid": "3.0.1"
},
"devDependencies": {
"#angular/animations": "~4.1.3",
"#angular/common": "~4.1.3",
"#angular/compiler": "~4.1.3",
"#angular/compiler-cli": "~4.1.3",
"#angular/core": "~4.1.3",
"#angular/forms": "~4.1.3",
"#angular/http": "~4.1.3",
"#angular/platform-browser": "~4.1.3",
"#angular/platform-browser-dynamic": "~4.1.3",
"#angular/platform-server": "~4.1.3",
"#angular/router": "~4.1.3",
"#angular/upgrade": "~4.1.3",
"#swimlane/ngx-datatable": "^8.0.0",
"#types/jasmine": "^2.5.47",
"#types/node": "^6.0.48",
"angular-pipes": "^6.5.1",
"angular-router-loader": "^0.6.0",
"angular2-in-memory-web-api": "0.0.21",
"angular2-moment": "^1.3.3",
"angular2-template-loader": "^0.6.0",
"angular2-text-mask": "^8.0.1",
"awesome-typescript-loader": "^3.1.2",
"babel-core": "^6.25.0",
"babel-loader": "^7.0.0",
"babel-preset-env": "^1.5.2",
"babel-preset-es2015": "^6.24.1",
"chart.js": "^2.5.0",
"clean-webpack-plugin": "0.1.16",
"clipboard": "^1.6.1",
"copy-webpack-plugin": "4.0.1",
"core-js": "^2.4.1",
"css-loader": "0.27.3",
"debug": "^2.6.8",
"ejs-loader": "0.3.0",
"eslint": "3.19.0",
"extract-text-webpack-plugin": "2.1.0",
"file-loader": "^0.11.1",
"glob": "^7.1.1",
"ie-shim": "^0.1.0",
"json2csv": "^3.7.3",
"knex": "0.13.0",
"less": "2.7.2",
"less-loader": "4.0.1",
"mime-types": "2.1.15",
"mocha": "^3.2.0",
"mydatepicker": "^1.9.2",
"ng-sidebar": "^4.1.1",
"ng2-charts": "^1.5.0",
"ng2-table": "^1.3.2",
"ng2-toastr": "^4.0.1",
"ng2-validation": "^4.1.0",
"ngx-bootstrap": "^1.6.6",
"ngx-progressbar": "^2.0.0",
"node-sass": "^4.5.2",
"primeng": "^4.0.0",
"prompt": "1.0.0",
"raw-loader": "^0.5.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"sass-loader": "^6.0.3",
"semver": "^5.3.0",
"to-string-loader": "^1.1.4",
"typescript": "~2.2.1",
"url-loader": "^0.5.8",
"waterline-utils": "^1.3.12",
"webpack": "^2.2.1",
"webpack-livereload-plugin": "^0.11.0",
"webpack-merge": "^0.15.0",
"webpack-watch-livereload-plugin": "0.0.1",
"zone.js": "~0.6.26"
},
"scripts": {
"start": "NODE_ENV=production node app.js",
"test": "npm run lint && npm run custom-tests && echo 'Done.'",
"lint": "node ./node_modules/eslint/bin/eslint . --max-warnings=0 && echo '✔ Your code looks good.'",
"custom-tests": "echo \"(No other custom tests yet.)\" && echo",
"version": "node -e 'process.stdout.write((require(\"./package.json\").version))'",
"bump": "node scripts/bump.js",
"debug": "node debug app.js",
"deploy-staging": "sails_environment=web_staging npm run bump && sails_environment=web_staging npm run deploy",
"deploy-demo": "sails_environment=web_demo npm run bump && npm run deploy",
"deploy": "cp -r eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && npm run zip && rm .ebbootstrap.sh && node scripts/publish-static-assets && node scripts/deploy-to-eb",
"zip": "mkdir -p .tmp && rm .tmp/deploy.zip &> /dev/null; zip -9 -r --exclude=node_modules/* --exclude=.tmp/* --exclude=.DS_Store --exclude=.git/* --exclude=config/local.js ./.tmp/deploy.zip .",
"deploy-alerts-staging": "sails_environment=alerts_staging npm run bump && sails_environment=alerts_staging npm run deploy-alerts",
"deploy-alerts": "cp eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && cp eb/apps/alerts/cron.yaml cron.yaml && npm run zip-backend && rm cron.yaml .ebbootstrap.sh && node scripts/deploy-to-eb",
"deploy-rollup-staging": "sails_environment=rollup_staging npm run bump && sails_environment=rollup_staging npm run deploy-rollup",
"deploy-rollup": "cp eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && cp eb/apps/rollup/cron.yaml cron.yaml && npm run zip-backend && rm cron.yaml .ebbootstrap.sh && node scripts/deploy-to-eb",
"deploy-devices-staging": "sails_environment=devices_staging npm run bump && sails_environment=devices_staging npm run deploy-devices",
"deploy-devices": "cp eb/bootstrap/$sails_environment.sh .ebbootstrap.sh && npm run zip-backend && rm .ebbootstrap.sh && node scripts/deploy-to-eb",
"deploy-device-sim": "cp eb/bootstrap/device_sim.sh .ebbootstrap.sh && cp eb/apps/device-sim/cron.yaml cron.yaml && npm run zip-backend && rm cron.yaml .ebbootstrap.sh && sails_environment=device_sim npm run bump && sails_environment=device_sim node scripts/deploy-to-eb",
"zip-backend": "mkdir -p .tmp && rm .tmp/deploy.zip &> /dev/null; zip -9 -r --exclude=node_modules/* --exclude=.tmp/* --exclude=.DS_Store --exclude=.git/* --exclude=src/* --exclude=config/local.js ./.tmp/deploy.zip ."
},
"main": "app.js",
"repository": {
"type": "git",
"url": "xxxxxxxxxx.git"
},
"author": "xxxxxx",
"license": ""
}
and below is validate-user-password.js
module.exports = {
friendlyName: 'Validate user password (strict)',
description: 'Strictly validate a string as the potential "password" for a user.',
cacheable: true,
sync: true,
inputs: {
string: {
description: 'The string to validate as a password.',
required: true,
example: 'abcd1234',
}
},
exits: {
success: {
description: 'The specified string is 100% valid.'
},
notValid: {
description: 'The specified string is not a valid password.'
},
},
fn: function (inputs,exits) {
// Coerce
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Since we don't need to support `strict: false` for this validator (it is ALWAYS strict), then we can
// just skip this part. (Also no need for the "notStrictlyValid" exit, output from the success exit,
// or the `strict` input)
//
// n/a
// Validate
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// • Must be long enough.
if (inputs.string.length < 7) {
return exits.notValid(new Error('Password must consist of at least 7 characters.'));
}
// • Must not be too long.
if (inputs.string.length > 72) {
return exits.notValid(new Error('Password must not contain more than 72 characters.'));
}
return exits.success();
}
};
Indeed, it is probably a update in Sails itself that caused that. Did you try the following configuration for validate-user-password.js ?
module.exports = {
friendlyName: 'Validate user password (strict)',
description: 'Strictly validate a string as the potential "password" for a user.',
sideEffects: 'cacheable',
sync: true,
/* ... rest of content ... */
}
I wonder if the issue is related to a change around this time in the version of machine used by Sails core. This normally wouldn't have affected your app unless the semantic version range (SVR) of your Sails dependency was manually increased. But since this app is using a prerelease of Sails v1, it's likely that was the reason this change got picked up downstream.
As #Alexis N-o mentioned, the solution is to instead of using cacheable: true, to use:
sideEffects: 'cacheable'
I'm new to ember and have set up a sandbox to play around with it. When I type the ember s command I get the error bellow, BUT - and that's the weird thing - the error appears only when I have the Sublime Text open (!?!). If I close the Sublime and type ember s again on the command line everything works fine!
lykos#lykos-VirtualBox:~/My_Projects/ember_sandbox(master)$ ember s
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
File: /home/lykos/My_Projects/ember_sandbox/app
The Broccoli Plugin: [object Object] failed with:
Error: watch /home/lykos/My_Projects/ember_sandbox/app ENOSPC
at exports._errnoException (util.js:1026:11)
at FSWatcher.start (fs.js:1429:19)
at Object.fs.watch (fs.js:1456:11)
at FSMonitor._measure (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/heimdalljs-fs-monitor/index.js:66:21)
at Object.watch (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/heimdalljs-fs-monitor/index.js:82:30)
at NodeWatcher.watchdir (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/sane/src/node_watcher.js:144:20)
at new NodeWatcher (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/sane/src/node_watcher.js:45:8)
at new sane (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/sane/index.js:17:12)
at EventEmitter.Watcher_addWatchDir [as addWatchDir] (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/ember-cli-broccoli-sane-watcher/index.js:131:17)
at /home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/broccoli-builder/lib/builder.js:112:35
The broccoli plugin was instantiated at:
at WatchedDir.Directory (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/broccoli-source/index.js:14:31)
at new WatchedDir (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/broccoli-source/index.js:58:13)
at EmberApp._initOptions (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/broccoli/ember-app.js:200:17)
at new EmberApp (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/broccoli/ember-app.js:121:8)
at module.exports (/home/lykos/My_Projects/ember_sandbox/ember-cli-build.js:6:13)
at CoreObject.setupBroccoliBuilder (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/models/builder.js:70:19)
at CoreObject.init (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/models/builder.js:50:10)
at CoreObject.superWrapper [as init] (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/core-object/lib/assign-properties.js:32:18)
at CoreObject.Class (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/node_modules/core-object/core-object.js:32:33)
at CoreObject.run (/home/lykos/My_Projects/ember_sandbox/node_modules/ember-cli/lib/tasks/serve.js:15:19)
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
Here are some additional info
$ ember -v
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.9.1
node: 6.9.1
os: linux x64
And my package.json file
{
"name": "ember_sandbox",
"version": "0.0.0",
"description": "Small description for ember_sandbox goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.9.1",
"ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^1.0.4",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.9.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "^4.0.10"
}
}
Any ideas how to fix this ???
This error probably happens because NodeWatcher runs out of file watches because it hit the maximum allowed by the system configuration.
Try to apply the solution of this answer: Node.JS Error: ENOSPC