NativeScript - 'Build failed with error code 2' - nativescript

My NativeScript Angular project, on which I've been working for some time, stopped compiling about one week ago, error message is Build failed with error code 2.
But, on another machine project compiles normally!
On both computers I use
NativeScript Sidekick, latest version: 1.19.1-v2019.8.1.2,
NativeScript CLI version: 6.0.3,
CLI extension nativescript-cloud version: 1.18.1,
CLI extension nativescript-starter-kits version: 0.3.5
I've reinstalled node, tns and Sidekick, I've deleted cloud cache, I've created new Telerik account in order to try to avoid anything cached on the cloud.
[19-08-19 10:18:56.133] Error detected during LiveSync on 709dacd534f7bbb357482d696468f8efbd5888ac for C:\Users\USR\Documents\NATIVESCRIPT\proj. Error: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:27.138] [WARN] Executing webpack failed with exit code 2.
[00:00:27.522] [ERROR] Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-08-19 10:20:26.189] Error detected during LiveSync on D67LLNGU7HY96HVO for C:\Users\USR\Documents\NATIVESCRIPT\proj. Error: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:17.670] [WARN] Executing webpack failed with exit code 2.
[00:00:17.730] [ERROR] Module not found: Error: Can't resolve './info.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info'
[00:00:17.730] [ERROR] Module not found: Error: Can't resolve './specs1.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/specs/specs1'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './specs2.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/specs/specs2'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './lzs.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info/lzs'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './specs.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/specs'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './aboutus.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/aboutus'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './pdk.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info/pdk'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './tips1.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/tips/tips1'
[00:00:17.731] [ERROR] Module not found: Error: Can't resolve './tips2.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/tips/tips2'
[00:00:17.734] [ERROR] Module not found: Error: Can't resolve './stuff.component.css' in '/mnt/storage/builds/_/0065576d41c5e3acbcdc3ba31c41167f50faec72/6.0.3/6.0.0/proj/src/app/info/stuff'
[00:00:17.996] [ERROR] Executing webpack failed with exit code 2.
'Build failed with error code 2'.
I build simultaneously for iOS and Android.
EDIT:
[19-08-21 08:56:25.214] Build started.
[19-08-21 08:56:26.279] (CLI) Preparing project...
[19-08-21 08:56:26.286] (CLI) Project successfully prepared (ios)
[19-08-21 08:56:26.835] (CLI) Starting Cloud build. Cloud operation id: 8367422f-bdae-4aef-bb0c-a4ff5dcb94a8
[19-08-21 08:56:26.840] (CLI) Getting accounts information...
[19-08-21 08:56:27.785] (CLI) Using account 79475b26e9fe4bf1952e3298ce5c9214.
[19-08-21 08:56:27.785] (CLI) Cloud build of 'C:\Users\usr\Documents\ns\acmeapp', platform: 'iOS', configuration: 'Debug'.
[19-08-21 08:56:28.784] Upload step started.
[19-08-21 08:56:29.383] (CLI) Unable to use git, reason is:
[19-08-21 08:56:29.383] (CLI) Git Installation Not Found. Install Git to improve the speed of cloud builds.
[19-08-21 08:56:37.691] Upload step completed.
[19-08-21 08:56:39.237] Build step started.
[19-08-21 08:56:44.398] (CLI) ios Build Tooling revision 2019.08.07.1r
[19-08-21 08:56:44.398] (CLI) Build Tooling Hostname administrators-mac-14.local
[19-08-21 08:56:44.398] (CLI) Unzip Project Files
[19-08-21 08:56:44.398] (CLI) NativeScript CLI version 6.0.3
[19-08-21 08:56:44.398] (CLI) Add platform ios with runtime version 6.0.1
[19-08-21 08:56:47.360] (CLI) Copying template files...
[19-08-21 08:56:50.375] (CLI) Platform ios successfully added. v6.0.1
[19-08-21 08:56:50.375] (CLI) Prepare Project for Platform - ios
[19-08-21 08:57:20.477] (CLI) Preparing project...
[19-08-21 08:57:33.894] (CLI) Hash: 7b2f90d5b50178cb7f9d
[19-08-21 08:57:33.894] (CLI) Version: webpack 4.27.1
[19-08-21 08:57:33.894] (CLI) Time: 10055ms
[19-08-21 08:57:33.894] (CLI) Built at: 08/20/2019 11:57:40 PM
[19-08-21 08:57:33.894] (CLI) Asset Size Chunks Chunk Names
[19-08-21 08:57:33.894] (CLI) bundle.js 61.8 KiB bundle [emitted] bundle
[19-08-21 08:57:33.894] (CLI) fonts/FontAwesome.ttf 162 KiB [emitted]
[19-08-21 08:57:33.894] (CLI) package.json 81 bytes [emitted]
[19-08-21 08:57:33.894] (CLI) runtime.js 71.4 KiB runtime [emitted] runtime
[19-08-21 08:57:33.894] (CLI) tns_modules/tns-core-modules/inspector_modules.js 643 bytes tns_modules/tns-core-modules/inspector_modules [emitted] tns_modules/tns-core-modules/inspector_modules
[19-08-21 08:57:33.894] (CLI) vendor.js 3.84 MiB vendor [emitted] vendor
[19-08-21 08:57:33.894] (CLI) Entrypoint bundle = runtime.js vendor.js bundle.js
[19-08-21 08:57:33.894] (CLI) Entrypoint tns_modules/tns-core-modules/inspector_modules = runtime.js vendor.js tns_modules/tns-core-modules/inspector_modules.js
[19-08-21 08:57:33.894] (CLI) [./app.scss] 19.8 KiB {bundle} [built]
[19-08-21 08:57:33.894] (CLI) [./main.ts] 926 bytes {bundle} [built]
[19-08-21 08:57:33.894] (CLI) [./package.json] 73 bytes {bundle} {tns_modules/tns-core-modules/inspector_modules} [optional] [built]
[19-08-21 08:57:33.894] (CLI) + 173 hidden modules
[19-08-21 08:57:33.894] (CLI) ERROR in src/app/foobar/bar-foobar/bar-foobar.component.ts(63,25): error TS2339: Property 'ios' does not exist on type 'Observable'.
[19-08-21 08:57:33.894] (CLI) src/app/foobar/bar-foobar/bar-foobar.component.ts(65,25): error TS2339: Property 'android' does not exist on type 'Observable'.
[19-08-21 08:57:33.894] (CLI) src/app/foobar/bar-foobar/bar-foobar.component.ts(67,25): error TS2339: Property 'android' does not exist on type 'Observable'.
[19-08-21 08:57:33.894] (CLI) src/app/foobar/bar-foobar/bar-foobar.component.ts(67,118): error TS2304: Cannot find name 'android'.
[19-08-21 08:57:33.894] (CLI) Webpack compilation complete.
[19-08-21 08:57:33.894] (CLI) Executing webpack failed with exit code 2.
[19-08-21 08:57:33.894] (CLI) # tns prepare
[19-08-21 08:57:33.894] (CLI) ### Description
[19-08-21 08:57:33.894] (CLI) Starts a Webpack compilation and prepares the app's App_Resources and the plugins platforms directories. The output is generated in a subdirectory for the selected target platform in the platforms directory. This lets you build the project for the selected platform. You must specify the target platform for which you want to prepare your project.
[19-08-21 08:57:33.894] (CLI) When running this command the HMR (Hot Module Replacement) is not enabled by default. In case you want to enable HMR, you can pass --hmr flag.
[19-08-21 08:57:33.894] (CLI) ### Commands
[19-08-21 08:57:33.894] (CLI) ┌─────────┬──────────────────────────┐
[19-08-21 08:57:33.894] (CLI) │ Usage │ Synopsis │
[19-08-21 08:57:33.894] (CLI) │ General │ $ tns prepare <Platform> │
[19-08-21 08:57:33.894] (CLI) └─────────┴──────────────────────────┘
[19-08-21 08:57:33.894] (CLI) ### Arguments
[19-08-21 08:57:33.894] (CLI) <Platform> is the target mobile platform for which you want to prepare your project. You can set the following target platforms.
[19-08-21 08:57:33.894] (CLI) * android - Prepares your project for an Android build.
[19-08-21 08:57:33.894] (CLI) * ios - Prepares your project for an iOS build.
[19-08-21 08:57:33.894] (CLI) ### Options
[19-08-21 08:57:33.894] (CLI) * --hmr - Enables the hot module replacement (HMR) feature.
[19-08-21 08:57:33.894] (CLI) * --force - If set, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring tns migrate.
[19-08-21 08:57:35.416] (CLI) Executing webpack failed with exit code 2.
[19-08-21 08:57:43.483] Build step completed.
[19-08-21 08:57:43.489] (CLI) Unable to apply changes on device: 709dacd534f7bbb357482d696468f8efbd5888ac. Error is: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:49.725] [WARN] Executing webpack failed with exit code 2.
[19-08-21 08:57:43.489] (CLI) [00:00:51.335] [ERROR] Executing webpack failed with exit code 2.
[19-08-21 08:57:43.489] (CLI) 'Build failed with error code 2'..
[19-08-21 08:57:43.494] Error detected during LiveSync on 709dacd534f7bbb357482d696468f8efbd5888ac for C:\Users\usr\Documents\ns\acmeapp. Error: Build failed. Reason is: 'Build failed with error code 2'. Additional information: [00:00:49.725] [WARN] Executing webpack failed with exit code 2.
[00:00:51.335] [ERROR] Executing webpack failed with exit code 2.
'Build failed with error code 2'.
[19-08-21 08:57:43.501] Stopped LiveSync on 709dacd534f7bbb357482d696468f8efbd5888ac for C:\Users\usr\Documents\ns\acmeapp.
And I've pinned the suspect - this started after I installed Angular CLI, but now even if I uninstall Angular CLI, error remains and I cannot use NativeScript!

Related

NativeScript + Apple M1 Error: 'arch install' command failed

NativeScript CLI (8.0.2) on Apple M1 CPU/MBP
When running ns run iOS I get this error.
error
'arch install' command failed.
I've tried running it from Rosetta Terminal & (installing Rosetta 2).
Any ideas?
tns prepare ios --log trace
Installing pods...
Running on arm64 - running pod through rosetta2.
spawn: arch "-x86_64" "pod" "install"
arch: posix_spawnp: pod: Bad CPU type in executable
Result when throw error is false:
{ stdout: '', stderr: '', exitCode: 1 }
'arch install' command failed.
Error: 'arch install' command failed.
at Errors.failWithOptions (/opt/homebrew/lib/node_modules/nativescript/lib/common/errors.js:157:27)
at Errors.fail (/opt/homebrew/lib/node_modules/nativescript/lib/common/errors.js:130:21)
at CocoaPodsService.<anonymous> (/opt/homebrew/lib/node_modules/nativescript/lib/services/cocoapods-service.js:55:30)
at Generator.next (<anonymous>)
at fulfilled (/opt/homebrew/lib/node_modules/nativescript/lib/services/cocoapods-service.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Have you tried installing an older version of cocoapods?
For me installing 1.10.2 instead of 1.11 fixed the issue for me.

React native build failed - xcodebuild: error: The workspace named "foo" does not contain a scheme named "foo"

I have a react native app that when Run from XCode it works as expected (builds and runs on a simulator). But when I try run it from my terminal with
npx react-native run-ios
I get the error:
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 foo.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace foo.xcworkspace -configuration Debug -scheme foo -destination id=FEB37
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
xcodebuild: error: The workspace named "foo" does not contain a scheme named "foo". The "-list" option can be used to find the names of the schemes in the workspace.
It might have something to do with my schemes here
When I manage my schemes in XCode I do NOT see scheme 'foo'. It is a generic app so it uses scheme 'bar' which is in the XCode manage gui.
I've also tried
npx react-native run-ios --configuration Debug --scheme Development
and get a very large logout with it ending in:
** BUILD FAILED **
The following build commands failed:
MergeSwiftModule normal x86_64
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
If I downgrade XCode from 12.5 to 12.0.1 it works as expected. But I would like to use the latest XCode.
If I run react-native info
info Fetching system and libraries information...
(node:11609) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
OS: macOS 11.4
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU # 2.30GHz
Memory: 905.50 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 28, 29, 30
Build Tools: 29.0.2, 30.0.3, 31.0.0
System Images: android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 15.0.2 - /usr/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
I've tried restarting my mac...
Do I have to wait for dependencies to be updated?
Here is the Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'vicinity' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
end
post_install do |installer|
react_native_post_install(installer)
end
I have also tried to clean and rerun the start script.
Any help in getting this to build in terminal would be great.
Here is the last bit of the build failure logs:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -merge-modules -emit-module /Users/grant/Library/Developer/Xcode/Derivtes.noindex/Pods.build/Debug-iphonesimulator/lottie-react-native.build/Objects-normal/x86_64/lottie_react_native.swiftmodule
<unknown>:0: error: fatal error encountered while reading from module 'lottie_react_native'; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project
<unknown>:0: note: module 'lottie_react_native' full misc version is '5.4(5.4)/Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)'
*** DESERIALIZATION FAILURE (please include this section in any bug report) ***
could not deserialize type for 'ContainerView': top-level value not found
Cross-reference to module 'lottie_react_native'
... RCTView
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Devel...ld/Debug-iphonesimulator/lottie-react-native.build/Objects-normal/x86_64/lottie_react_native.swiftmodule
1. Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
2. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module lottie_react_native)
0 swift-frontend 0x000000010c7e5e85 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 swift-frontend 0x000000010c7e4e78 llvm::sys::RunSignalHandlers() + 248
2 swift-frontend 0x000000010c7e6446 SignalHandler(int) + 262
3 libsystem_platform.dylib 0x00007fff2066ed7d _sigtramp + 29
4 libdyld.dylib 0x00007fff20643d08 _dyld_fast_stub_entry(void*, long) + 65
5 libsystem_c.dylib 0x00007fff2057e411 abort + 120
6 swift-frontend 0x0000000108554384 swift::ModuleFileSharedCore::fatal(llvm::Error) + 100
7 swift-frontend 0x00000001084d9b48 swift::ModuleFile::fatal(llvm::Error) + 2600
8 swift-frontend 0x000000010853d824 swift::SILDeserializer::readVTable(llvm::PointerEmbeddedInt<unsigned int, 31>) + 2532
9 swift-frontend 0x00000001085c21cb swift::SILDeserializer::getAll(bool) + 107
10 swift-frontend 0x0000000107ea2393 swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const + 10899
11 swift-frontend 0x0000000107fae50d swift::SimpleRequest<swift::ASTLoweringRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> > (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) + 205
12 swift-frontend 0x0000000107ea64ac llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(swift::ASTLoweringRequest const&) + 780
13 swift-frontend 0x0000000107ea2d3f swift::performASTLowering(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions const&) + 143
14 swift-frontend 0x0000000107a0602e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7150
15 swift-frontend 0x0000000107987e82 main + 1266
16 libdyld.dylib 0x00007fff20644f5d start + 1
17 libdyld.dylib 0x0000000000000087 start + 18446603339972718891
=== BUILD TARGET react-native-splash-screen OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
CompileC /Users/grant/Library/Developer/Xcode/Derive...t-native-splash-screen/react-native-splash-screen-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/grant/repos/foo/foo-centres-app/packages/app/ios/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/De...dk/tools:/Users/grant/Library/Android/sdk/tools/bin:/Users/grant/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolc...ld/Debug-iphonesimulator/react-native-splash-screen.build/Objects-normal/x86_64/react-native-splash-screen-dummy.o
CompileC /Users/grant/Library/Developer/Xcode/Derived...app/node_modules/react-native-splash-screen/ios/RNSplashScreen.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/grant/repos/foo/foo-centres-app/packages/app/ios/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/D...y/Android/sdk/tools/bin:/Users/grant/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/...uild/Debug-iphonesimulator/react-native-splash-screen.build/Objects-normal/x86_64/RNSplashScreen.o
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
MergeSwiftModule normal x86_64 /Users/grant/Library/Developer/Xcode/DerivedData/foo-...or/lottie-react-native.build/Objects-normal/x86_64/lottie_react_native.swiftmodule
(2 failures)
info Run CLI with --verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #foo/foo-centres-app-app#3.0.3 start: `scripts/start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #foo/foo-centres-app-app#3.0.3 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
➜ ~/repos/foo/foo-centres-app/packages/app git:(update-release-app-v2) ✗
The output of xcodebuild -list
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Information about project "foo":
Targets:
foo
Build Configurations:
Debug
Release
Emp
Chad
Test
PreProduction
Master
If no build configuration is specified and -scheme is not passed then "Release" is used.
Schemes:
Chad
Development
Emp
Master
PreProduction
Release
Test
I suspect something else..
please check beyond the schema such as accessibility/permission. Since there are more than one reasons this can happen, I recommend verifying all below.
// a very helpful debug
xcodebuild -list
Basic Debug xcodebuild -list; once they are configured correctly, shared they will successfully should up as shared for you.
      
Default configuration of Schemes is private you have to configure/make it shared
In the terminal/command-line build, the Xcode UI never runs and the xcoderun tool doesn't have its own cache of Schemes to work with.
Step 1: Make your schema accessible to the command-line build
Make your schema accessible to the command-line build by changing it to a shared scheme.
Menu > Product > Scheme > Manage Schemes
Verify/Check off the 'Shared' box for that scheme
Select Schema you want to create and click on the Edit button
Uncheck and Checkoff just to be sure the "Shared" checkbox.
Now go to WorkspaceName.xcworkspace/xcshareddata/xcschemes
Now verify a new .xcscheme file has been created in your project at
WorkspaceName.xcworkspace/xcshareddata/xcschemes.
Please remember to commit this file to your repository, so that your CI builds will also work
Verify again, since the folder names are case sensitive
From your build or release configuration path
      
      
Step 2: Do you have cocoapods - yes/no
NO, If your project is NOT using cocoapods , then you should delete the .xcworkspace file from ./ios directory.
yes, or if you are using a workspace (e.g. with pods), debug/verify like so, here..
// a very helpful debug
xcodebuild -workspace MyProject.xcworkspace -list
Another question on SO, with different approach
Step 3:
If you previously created the folder from step 1, or for some reason renamed/edited project, then go in an update the names manually
Open Foo as a directory in finder.
Open the folder xcshareddata/xcschemes
Rename the xcscheme files there
Can you make sure you're using the right version of Xcode, by running xed --version. There might be a mismatch with the Xcode version that React Native is using (not that this should cause a problem by itself)? You can change it with xcode-select.
Can you try upgrade lottie-react-native to 4.0.2, using npm i lottie-react-native#4.0.2, you're using 3.5.0.
Can you try upgrade lottie-ios to 3.2.3, using npm i lottie-ios#3.2.3
Then make sure you run cd ios and pod install
If you get linker warnings, follow this
If you get desperate, you can delete the ios folder and regenerate it by running by creating a new project with the same name, and copying the iOS folder into your existing project. Or you can just compare the 2 projects/ schemes, and see what you're missing.
Good luck 🙂
Looking at this output from xcodebuild -list
Information about project "foo":
Targets:
foo
Build Configurations:
Debug
Release
Emp
Chad
Test
PreProduction
Master
If no build configuration is specified and -scheme is not passed then "Release" is used.
Schemes:
Chad
Development
Emp
Master
PreProduction
Release
Test
And this error from npx react-native run-ios -
xcodebuild: error:
The workspace named "foo" does not contain a scheme named "foo".
The "-list" option can be used to find the names of the schemes in the workspace.
The error says that - the target foo (listed under Targets: in the output) should have a corresponding scheme called foo (that should have been listed under Schemes: in the output) which it can't find while using npx react-native run-ios.
As you say, you are able to run this from Xcode successfully, you should note which scheme are you running. You can find it on the top left corner - right next to play / stop buttons. Adventure iOS in the below screenshot is the scheme.
Note down it's name (case sensitive), make sure it's listed under Schemes: in the above output, if it's not - make sure it's shared (Edit Scheme > Check the Shared Checkbox).
After that you can run using command line using that scheme name like following - say you are successfully running "Chad" scheme from Xcode, run that using command line like this.
npx react-native run-ios --scheme "Chad"

React Native CLI version for Xcode 9.2

I had followed the instructions on installing React Native from the official website.
After doing as instructed, when I run the code, I get a error and after some research I found out it is because I am still using a 2011 MAC BOOK PRO and the Xcode version I am using is Xcode 9.2 which is not really compatible with the current version of React Native.
I would like to use the old version of React Native. Which React Native version is compatible with Xcode 9.2 and which React Native CLI version should I be using?
I tried installing the old version using the CLI by:
react-native init Test --version 0.51
But I get the following error:
This will walk you through creating a new React Native project in
/Users/bliss/Documents/Coder/ReactNative/Test Using yarn v1.3.2
Installing 0.51... yarn add v1.3.2 info No lockfile found. [1/4] 🔍
Resolving packages... error An unexpected error occurred:
"https://registry.yarnpkg.com/0.51: Not found". info If you think this
is a bug, please open a bug report with the information provided in
"/Users/bliss/Documents/Coder/ReactNative/Test/yarn-error.log". info
Visit https://yarnpkg.com/en/docs/cli/add for documentation about this
command. { Error: Command failed: yarn add 0.51 --exact
at checkExecSyncError (child_process.js:629:11)
at execSync (child_process.js:666:13)
at run (/usr/local/lib/node_modules/react-native-cli/index.js:294:5)
at createProject (/usr/local/lib/node_modules/react-native-cli/index.js:249:3)
at init (/usr/local/lib/node_modules/react-native-cli/index.js:200:5)
at Object. (/usr/local/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12) status: 1, signal: null, output: [ null, null, null ], pid: 6231,
stdout: null, stderr: null } Command yarn add 0.51 --exact failed.
The format you are giving in the version is in the wrong way.
As you can see in the docs it should be
react-native init AwesomeProject --version X.XX.X
Instead of 0.51 try 0.51.0.
You can also check this question where there is alot of answer and other ways of doing it.

jupyter-kernelspec' not found, when executing Pkg.build("IJulia")

Please, trying to rebuild IJulia given I am not able to launch it via Anaconda navigator (I receive the red kernel error). With the command Pkg.build("IJulia"), below is the output:
INFO: Building Conda
INFO: Building MbedTLS
===============================[ ERROR: MbedTLS]============================
LoadError: unlink: operation not permitted (EPERM)
while loading C:\Users\s1364322\.julia\v0.6\MbedTLS\deps\build.jl, in expression starting on line 40
==============================================================================
INFO: Building ZMQ
INFO: Building IJulia
INFO: Installing Jupyter via the Conda package.
INFO: Found Jupyter version 4.3.0:
C:\Users\s1364322\.julia\v0.6\Conda\deps\usr\Scripts\jupyter
INFO: Installing Julia kernelspec julia-0.6
Error executing Jupyter command 'kernelspec': [Errno 'jupyter-kernelspec' not found] 2
[InstallKernelSpec] Removing existing kernelspec in
C:\Users\s1364322\AppData\Roaming\jupyter\kernels\julia-0.6
[InstallKernelSpec] Installed kernelspec julia-0.6 in
C:\Users\s1364322\AppData\Roaming\jupyter\kernels\julia-0.6
================================[ BUILD ERRORS]=============================
WARNING: MbedTLS had build errors.
- packages with build errors remain installed in C:\Users\s1364322\.julia\v0.6
- build the package(s) and all dependencies with Pkg.build("MbedTLS")
- build a single package by running its deps/build.jl script
===============================================================================
When I try Pkg.build("MbedTLS"), the output is:
LoadError: unlink: operation not permitted (EPERM)
while loading C:\Users\s1364322\.julia\v0.6\MbedTLS\deps\build.jl, in expression starting on line 40
Please, how can I get the way around?
This is my version info:
Julia Version 0.6.0
Commit 903644385b* (2017-06-19 13:05 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-6300U CPU # 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, skylake)
Thanks for your help!

Nativescript Sidekick cloud build error. Available builds being counted down too

I’m experiencing some issues on my Sidekick’s iOS cloud build, where in it says that it built successfully then notifies an error message. Hence, no downloaded ipa archive.
My available cloud builds are being counted down due to ‘successful’ build. But there’s no ipa file downloaded. I feel like I’m being ripped off. :(
Details.
iOS cloud build
-Release box checked with Uglify, Snapshot, AOT checked too.
-used an iOS Adhoc distribution profile.
Error Message. (I don’t have any proxies as far as I know.)
[18-04-12 19:19:37.347] Build failed. read ECONNRESET
[18-04-12 19:32:10.741] (CLI) (node:17386) Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26)
[18-04-12 19:32:12.642] (CLI) (node:17386) Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26)
[18-04-12 19:32:13.803] (CLI) (node:17386) Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26)
[18-04-12 19:32:21.098] (CLI) (node:17386) Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26)
[18-04-12 19:32:21.110] (CLI) (node:17386) Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26)
[18-04-12 19:32:21.706] (CLI) (node:17386) Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26)
[18-04-12 19:39:26.066] Build failed. read ECONNRESET
Your build is actually successful and that's why your remaining builds are decreasing. Your build result download request is interrupted while NativeScript Sidekick downloads your ipa. This can happen if you have network request restrictions.
You can get the result download url from the detailed build logs and try to download the ipa manually. The build result download url will look like this https://[s3-bucket-name].s3.amazonaws.com/[some-random-string]/[project-name].ipa?[some-s3-temp-credentials]
You should just get the detailed logs and search for .ipa in them to find the download url.
How to enable detailed logs:
Open [path-to-installed-nativescript-cli]/config/config.json
Change the DEBUG option to true
The config should look like this:
{
"DEBUG": true,
"TYPESCRIPT_COMPILER_OPTIONS": {},
"CI_LOGGER": false,
"ANDROID_DEBUG_UI_MAC": "Google Chrome",
"USE_POD_SANDBOX": false,
"DISABLE_HOOKS": false
}
If you still can't download your ipa, you should try to use another network to see if the problem is in your network.
If you manage to download the ipa manually from the download link, you could submit a bug report in https://github.com/NativeScript/sidekick-feedback/issues.
If the suggested above does not help you to resolve the issue, I still recommend that you open a new issue in the repository mentioned above.

Resources