Repository navigation
Closed
Labels
Description
Hi,
I am trying to run the "tns run ios" for both demos I am having the same problem for both:
Project successfully built.
Installing...
Successfully installed on device with identifier 'D7FF528C-C525-4DB2-8264-1E2BB88D8F3A'.
Successfully transferred all files.
Refreshing application...
Successfully synced application org.nativescript.demo on device D7FF528C-C525-4DB2-8264-1E2BB88D8F3A.
Executing before-watch hook from /Library/WebServer/Documents/nativescript-facebook/demo/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 2.2.2
objc[26573]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x119ebccc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x119cd36f0). One of the two will be used. Which one is undefined.
17:20:55 - Compilation complete. Watching for file changes.
1 0x109bd629c -[TNSRuntime executeModule:referredBy:]
2 0x1095a3eb0 main
3 0x10e54765d start
file:///app/app.js:5:38: JS ERROR Error: Could not find module 'nativescript-facebook'. Computed path '/Users/fiel/Library/Developer/CoreSimulator/Devices/D7FF528C-C525-4DB2-8264-1E2BB88D8F3A/data/Containers/Bundle/Application/F503F1DA-61DF-4369-BFB1-F5BEA5E0F495/demo.app/app/tns_modules/nativescript-facebook'.
I tried to run "tns plugin add nativescript-facebook" but it shows me a message "It is already installed"
Am I missing something?
Thanks in advance.
Activity
radeva commentedon Aug 18, 2017
Hi @gpfiel ,
You can see in the demo's package.json that it uses the plugin implementation from the
srcfolder which requires to runnpm iandtscin both thesrcfirst. It looks like you missed and the plugin's TypeScript files are not transpiled to javascript. To ease the plugin and demo builds we have created some scripts to do this so you need just to follow these steps:nativescript-facebookfoldergit clean -fdx. This will clean all non-versioned files which were generated fromtns run. Or just get a clean copy of the code.cd demonpm run build.plugin- this will install plugin dependencies and transpile the TypeScripttns run ios- this will install demo dependencies, transpile the TypeScript to javascript and run the application.Let me know if this works for you.
Best regards,
Veselina
gpfiel commentedon Aug 18, 2017
Hi @radeva,
Sorry I missed some steps. I checked the package.json, I didn't realize it was using the ../src.
But aftter following the steps above I've got a new problem.
Any idea about this one?
The application crashes after it is started.
Thanks for you help :)
Regards,
Gabriel Fiel.
radeva commentedon Aug 18, 2017
Hi @gpfiel,
I tried the angular demo on my side with iPhone 7 Simulator and it works as expected. Could you give some more info like:
tns --version)You can also try to clean you
platformsfolder (runrm -rf platformsif you're on MAC) and runtns run iosonce again.If the problem persists, I'll ask you to send us a zip with all the files so we can check it on our side.
Best regards,
Veselina
gpfiel commentedon Aug 18, 2017
Hi @radeva,
I am trying run it on an Iphone SE (Simulator on Macbook), IOS 10.3, TNS version 3.1.3. My mac os is Sierra.
JS ERROR Error: Unexpected value 'NativeScriptFacebookModule' imported by the module 'AppModule'. Please add a @NgModule annotation.-canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"The important to me is to make it work on demo-angular because my application is angular.
Regards,
Gabriel Fiel.
radeva commentedon Aug 18, 2017
Hi @gpfiel,
Could you try to reset Simulator Content and Settings and try to run the demos again? To do so go to Simulator -> Reset Content and Settings. Here is more discussion on that topic.
Best regards,
Veselina
gpfiel commentedon Aug 18, 2017
Hi @radeva,
I reseted it but I didn't get any changes. Same problem.
Regards,
Gabriel Fiel.
radeva commentedon Aug 18, 2017
Hi @gpfiel .
To fix the angular demo issue, could you make sure you do not use
npm linkto link the plugin indemo-angular? To remove any module linking you can do the following:srcfolder and runnpm unlinkdemo-angularand runnpm unlink nativescript-facebookdemo-angularrunrm -rf node_modulesandnpm iThis should fix the issue in
demo-angular.Could you try to do the same in
demoand tell if the issue there still appears? I'm still not able to reproduce it.Best regards,
Veselina
gpfiel commentedon Aug 21, 2017
Hi @radeva,
I was following the steps above but I've got an extra error. Also I did clone the plugin again to ensure it was clean.
Regards,
Gabriel Fiel.
radeva commentedon Aug 21, 2017
Hi @gpfiel,
Have you run
npm run build.pluginfrom thedemoordemo-angularfolder? Take a look at my first answer above.Best regards,
Veselina
gpfiel commentedon Aug 21, 2017
Hi @radeva,
Yes, I did it. The demo folder is working fine.
My issue is demo-angular.
If possible could we have a call on skype? So I can show whats is happening there.
Skype: gpfiel
Regards,
Gabriel Fiel
radeva commentedon Aug 21, 2017
Hi @gpfiel,
Let's have a chat in the NativeScript Community Slack. I sent you an invitation.
In the meantime you can try to
demo-angularrm -rf node_modulesrm -rf platformsnpm itns run iosBest regards,
Veselina
radeva commentedon Aug 22, 2017
SOLVED:
JS ERROR Error: Unexpected value 'NativeScriptFacebookModule' imported by the module 'AppModule'. Please add a @NgModule annotation.error can be fixed by installing thenativescript-facebookplugin fromnpmand not from thesrcfolder.dtopuzov commentedon Aug 23, 2017
@gpfiel @radeva
Can you please test with
nativescript@next, yesterday we pushed a fix that should resolve this issue.zbranzov commentedon Aug 23, 2017
I'm closing this issue as the above fix solves it. It was caused by the npm 5 symlinks. More info can be found in fix description. If you want to install the version of nativescript containing the fix use "npm i nativescript@next -g" or wait for the official release.
@gpfiel