Nativescript-angular: nsRouterLink doesn't work

Created on 6 Nov 2017  路  10Comments  路  Source: NativeScript/nativescript-angular

Hi guys,

I'm testing nsRouterLink with the ActionBar, but the navigation doesn't work from iOS
Check please: https://github.com/proyecto26/nativescript-ionic-template
Exist any way to see the log of the issue?

Any help is really apreciated, Nicholls

ios

Most helpful comment

@NickIliev for now, delete the symlink reference inside of nativescript/src (it'll be a broken looking file called fonts).

There's a limitation with symlinks, that you cannot symlink an inner directory, when the parent is already linked. You'll notice in the post install script, it warns that the symlink already exists (this is why).

When time allows hopefully this weekend, I'll fix that in the parent seed.

All 10 comments

Hey @jdnichollsc I have followed the instructions given in the repository but the nativescript project fails on my side during npm run livesync with

> [email protected] prepCLITablet /Users/niliev/Desktop/test/nativescript-ionic-template/nativescript
> gulp build.cli.Default

[09:07:04] No gulpfile found

And this error is preventing me further investigating this issue.
Can you please provide sample project or insights on how to handle the missing gulpfile.

Ohh sorry @NickIliev, it was an issue with the gitignore of https://github.com/TeamMaestro/angular-native-seed/, please check again.
I fixed my gitignore and I created a pull request to fix the issue from the https://github.com/TeamMaestro/angular-native-seed/pull/70

Thanks in advance, let me know what you think

It doesn't work on Android too, only works on Web :/

Exist some scenarios you can test guys using the nativescript-ionic-template, for example:

  • Events of the Buttons into ActionItem doesn't work
  • nsRouterLink doesn't work with modules using lazy load
  • page-router-outlet doesn't work well (the content of the second page does not load)

@jdnichollsc now the gulp file is available I was able to execute npm run livesync.
However, then I have opened another terminal and when executing npm run ios | android I am receiving the following error:

niliev@mcsofniliev ~/D/t/n/nativescript> npm run ios

> [email protected] ios /Users/niliev/Desktop/test/nativescript-ionic-template/nativescript
> npm run prepCLITablet && tns run ios


> [email protected] prepCLITablet /Users/niliev/Desktop/test/nativescript-ionic-template/nativescript
> gulp build.cli.Default

[11:31:18] Using gulpfile ~/Desktop/test/nativescript-ionic-template/nativescript/gulpfile.js
[11:31:18] Starting 'build.cli.Default'...
[11:31:18] Starting 'build.Default'...
[11:31:18] Starting 'clean.Dist'...
[11:31:18] Finished 'clean.Dist' after 8.66 ms
[11:31:18] Starting 'resources.App_Resources'...
[11:31:18] Finished 'resources.App_Resources' after 116 ms
[11:31:18] Starting 'resources.Assets'...
[11:31:18] 'resources.Assets' errored after 18 ms
[11:31:18] Error: ENOENT: no such file or directory, stat '/Users/niliev/Desktop/test/nativescript-ionic-template/nativescript/src/fonts'
    at Error (native)
[11:31:18] 'build.Default' errored after 147 ms
[11:31:18] 'build.cli.Default' errored after 148 ms

npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "prepCLITablet"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepCLITablet: `gulp build.cli.Default`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] prepCLITablet script 'gulp build.cli.Default'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nativescript-ionic-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp build.cli.Default
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nativescript-ionic-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nativescript-ionic-template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/niliev/Desktop/test/nativescript-ionic-template/nativescript/npm-debug.log

npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ios"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] ios: `npm run prepCLITablet && tns run ios`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] ios script 'npm run prepCLITablet && tns run ios'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nativescript-ionic-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run prepCLITablet && tns run ios
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nativescript-ionic-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nativescript-ionic-template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/niliev/Desktop/test/nativescript-ionic-template/nativescript/npm-debug.log
(1) niliev@mcsofniliev ~/D/t/n/nativescript> 

It looks like some asset folders are missing in the repository (e.g. fonts).
Perhaps, it is some issue with this Symbolic link

Btw, executing 'npm run livesync' is giving only the folliwng input

(130) niliev@mcsofniliev ~/D/t/n/nativescript> npm run livesync

> [email protected] livesync /Users/niliev/Desktop/test/nativescript-ionic-template/nativescript
> gulp tns.Livesync

[11:39:14] Using gulpfile ~/Desktop/test/nativescript-ionic-template/nativescript/gulpfile.js
[11:39:14] Starting 'tns.Livesync'...

Hi @NickIliev,
That folder is created after execute npm i at the root of the project.
I just cloned and executed the project without problems, executing the following steps:

npm i
cd nativescript
npm i
npm run ios

Let me know what you think, thanks in advance! 馃憤

@NickIliev for now, delete the symlink reference inside of nativescript/src (it'll be a broken looking file called fonts).

There's a limitation with symlinks, that you cannot symlink an inner directory, when the parent is already linked. You'll notice in the post install script, it warns that the symlink already exists (this is why).

When time allows hopefully this weekend, I'll fix that in the parent seed.

@sean-perkins @jdnichollsc I 've managed to overcome the symlink troubles with fonts by simply deleting the symlink file. folder. However, I am still experiencing troubles running a successful build.
After the symlink issue has been resolved now I am facing a crash caused by the l18n translation library.

Response with status 404 Ok for URL: /Users/Library/............../nativescript.app/app/assets/l18n/en.json

Looking into the nativescript application I was unable to find localization files at all - ideas about this one?

mmm very odd, what do you think @sean-perkins?

I think we can close this issue, thanks guys for the help 馃憤
PD: The only error that persist is Events of the Buttons into ActionItem doesn't work, but the events works using from the ActionItem instead

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AyWa picture AyWa  路  33Comments

marklanhamhc picture marklanhamhc  路  37Comments

tsonevn picture tsonevn  路  27Comments

morzyns picture morzyns  路  39Comments

jlooper picture jlooper  路  57Comments