Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing binding name 'EventEmitter' is not found. #5

Closed
ignaciolarranaga opened this issue Oct 24, 2016 · 4 comments
Closed

Importing binding name 'EventEmitter' is not found. #5

ignaciolarranaga opened this issue Oct 24, 2016 · 4 comments

Comments

@ignaciolarranaga
Copy link

I receive this error when I tried to update to angular 2.1.
You posted in here NathanWalker/angular-seed-advanced#270 that the solution for angular-seed-advanced is on master, I don't know if it is just needed to release a version from here ?

Here is the error received by the way:

Project successfully built
Successfully deployed on device with identifier '00A4117D-42D7-4D34-A741-4D4FAA4286CD'.
Oct 24 06:18:58 MacBook-Pro-de-Ignacio gyntoclient[7921]: 1   0x105ac88d7 -[TNSRuntime executeModule:]
Oct 24 06:18:58 MacBook-Pro-de-Ignacio gyntoclient[7921]: 2   0x102b9b102 main
Oct 24 06:18:58 MacBook-Pro-de-Ignacio gyntoclient[7921]: 3   0x10840092d start
Oct 24 06:18:58 MacBook-Pro-de-Ignacio gyntoclient[7921]: file:///app/app.module.js:4:30: JS ERROR SyntaxError: Importing binding name 'EventEmitter' is not found.
Oct 24 06:18:58 MacBook-Pro-de-Ignacio com.apple.CoreSimulator.SimDevice.00A4117D-42D7-4D34-A741-4D4FAA4286CD.launchd_sim[21782] (UIKitApplication:com.gynto.client[0xf63c][7921]): Service exited due to signal: Segmentation fault: 11

And those are the lines of app.module.js:

"use strict";
// this import should be first in order to load some required settings (like globals and reflect-metadata)
var core_1 = require("@angular/core");
var ng2_translate_1 = require("ng2-translate/ng2-translate");
var platform_1 = require("nativescript-angular/platform");
var forms_1 = require("nativescript-angular/forms");
var router_1 = require("nativescript-angular/router");
var http_1 = require("nativescript-angular/http");

This is line 4: var ng2_translate_1 = require("ng2-translate/ng2-translate");

@NathanWalker
Copy link
Owner

@ignaciolarranaga This plugin is actually not needed anymore to use ng2-translate with NativeScript. The feature it provided is now available in core. To use ng2-translate with NativeScript, see this as example of how:
https://github.com/NathanWalker/angular-seed-advanced/blob/master/nativescript/app/native.module.ts#L45-L49

https://github.com/NathanWalker/angular-seed-advanced/blob/master/src/client/app/frameworks/i18n/multilingual.module.ts#L17-L19

The seed uses a MultilingualModule just to wrap more features with i18n but you can use the factory with TranslateModule.forRoot({ ... etc.. just the same.
Note that on the path to the locale files, it should be absolute starting with slash from the app directory of the {N} app.

@ignaciolarranaga
Copy link
Author

Thanks @NathanWalker, actually my problem was that I had a wrong import import { ... } from "ng2-translate/ng2-translate"; (I realize after applying your suggestion and still getting the same error), but also useful to remove the no longer useful plugin.

@juanchofelipe
Copy link

I am making an app using the code sharing with angular, and I have the next structure in my project:

image

But I'm always getting an 404 error message when it tries to load the language file, how could I configure the project in order to load the files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants