nativescript-angular
nativescript-angular copied to clipboard
ERROR in error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI:
tns --version= 6.7.8 - Cross-platform modules:
@nativescript/core has 7.0.0-rc.33 version and is up to date - Android Runtime:
tns-android is not installed - iOS Runtime:
tns-ios has 6.5.2 version and is up to date - Plugin(s): -
- NativeScript-Angular:
10.0.0 - Angular:
10.0.4
Describe the bug
tns run ios throws:
ERROR in error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option.
To Reproduce
ng new -c=@nativescript/schematics test2
cd test2
npm i
tns run ios # throws incompatibility
tns migrate
tns run ios # throws the error above
Expected behavior The application should start in an iOS simulator.
Sample project This is a bare empty project generated by the commands above.
I'm having the same issue
Anyone get a solution?
Just in case anyone is still struggling with this, one of the many things I've changed is that although every documentation says you should no longer need the tsconfig.json, you still do. Also the tsconfig.tns.json Good news is there's actually light at the end of the tunnel. I'm struggling with getting a properly working baseline for Angular10 but I did get to the point where web, android and ios were at least loading. I will try to share this as soon as I get a coundown timer working as well
Just in case anyone is still struggling with this, one of the many things I've changed is that although every documentation says you should no longer need the tsconfig.json, you still do. Also the tsconfig.tns.json Good news is there's actually light at the end of the tunnel. I'm struggling with getting a properly working baseline for Angular10 but I did get to the point where web, android and ios were at least loading. I will try to share this as soon as I get a coundown timer working as well
Hey, did you manage to fully run your project
is there any update on this?
-
created a fresh project using
ng new --collection=@nativescript/schematics my-mobile-app -
then I do 'tns run android'
I get this same error without modifying anything.
is there any update on this?
Same problem. Change 2 files: tsconfig.json and nativescript.config.json. See below and than it will work
You have to change file tsconfig.json. add: "baseUrl": ".",
{ "compilerOptions": { "module": "ESNext", "target": "es2015", "moduleResolution": "node", "experimentalDecorators": true, "emitDecoratorMetadata": true, "skipLibCheck": true, "noEmitHelpers": true, "noEmitOnError": true, "baseUrl": ".", "lib": [ "es2015", "dom", "es6" ] }, "exclude": [ "node_modules", "platforms" ] }
and change file: nativescript.config.json change the appResourcesPath: 'app/App_Resources' (add app folder)
nativescript.config.json
import { NativeScriptConfig } from '@nativescript/core';
export default { id: 'org.nativescript.mymobileapp', appResourcesPath: 'app/App_Resources', android: { v8Flags: '--expose_gc', markingMode: 'none', }, appPath: 'app' } as NativeScriptConfig;