Reputation: 2660
I'm working on a Nativescript project that needs to be converted into native Android code. I have little Nativescript experience so I'm doing a tutorial on "code sharing".
https://docs.nativescript.org/code-sharing/creating-a-new-project
I've gone through the setup and have all dependencies installed. I can confirm this with tns doctor
:
✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.4.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.2.1 version and is up to date.
Then I've run the 2 mentioned commands:
$ npm i -g @nativescript/schematics
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: [email protected]
npm WARN node_modules/@nativescript/schematics/node_modules/typescript
npm WARN peer typescript@">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" from [email protected]
npm WARN node_modules/@nativescript/schematics/node_modules/tslint
npm WARN peer tslint@"^5.16.0" from @nativescript/[email protected]
npm WARN node_modules/@nativescript/schematics/node_modules/@nativescript/tslint-rules
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@"^3.4.0" from @nativescript/[email protected]
npm WARN node_modules/@nativescript/schematics/node_modules/@nativescript/tslint-rules
npm WARN @nativescript/tslint-rules@"~0.0.5" from @nativescript/[email protected]
npm WARN node_modules/@nativescript/schematics
changed 88 packages in 11s
12 packages are looking for funding
run `npm fund` for details
And then the second one, but the issue seems to be already in the first command:
$ ng new --collection=@nativescript/schematics hello-world --shared
⠏ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/tslint
npm ERR! dev tslint@"~6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslint@"^5.16.0" from @nativescript/[email protected]
npm ERR! node_modules/@nativescript/tslint-rules
npm ERR! dev @nativescript/tslint-rules@"~0.0.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/jclermonts/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jclermonts/.npm/_logs/2021-03-27T16_45_09_004Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Any help would be greatly appreciated.
--force
and --legacy-peer-deps
Upvotes: 2
Views: 267