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

beta12 import error #25

Closed
wieseljonas opened this Issue Mar 27, 2016 · 7 comments

Comments

Projects
None yet
6 participants
@wieseljonas

hi I'm struggling after moving to angular2 beta12

 ✗ TypeScript error: /xxxx/node_modules/angular2-moment/CalendarPipe.ts(49,7): Error TS2322: Type 'EventEmitter<{}>' is not assignable to type 'EventEmitter<Date>'.
  Type '{}' is not assignable to type 'Date'.
    Property 'toDateString' is missing in type '{}'.
 ✗
/xxxxx/node_modules/angular2-moment/TimeAgoPipe.ts:3
import {Pipe, ChangeDetectorRef, PipeTransform, OnDestroy} from 'angular2/core';
^
@urish

This comment has been minimized.

Show comment
Hide comment
@urish

urish Mar 27, 2016

Owner

Hi, can you please publish a small code sample that reproduces the issue? Gist or plunker.

Owner

urish commented Mar 27, 2016

Hi, can you please publish a small code sample that reproduces the issue? Gist or plunker.

@wieseljonas

This comment has been minimized.

Show comment
Hide comment
@wieseljonas

wieseljonas Mar 29, 2016

Hi Urish here is my package.json . I get the error when I declare the TimeAGoPipe in my Component.

{
  "name": "mako",
  "description": "Mako",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/driftyco/ionic-conference-app.git"
  },
  "dependencies": {
    "angular2": "^2.0.0-beta.7",
    "angular2-jwt": "0.1.6",
    "es6-promise": "3.0.2",
    "es6-shim": "^0.35.0",
    "ionic-angular": "2.0.0-beta.3",
    "ionic-native": "^1.1.0",
    "ionicons": "3.0.0-alpha.3",
    "lodash": "^4.6.1",
    "reflect-metadata": "0.1.2",
    "rxjs": "^5.0.0-beta.2",
    "zone.js": "^0.6.6"
  },
  "devDependencies": {
    "babel-preset-es2015": "^6.6.0",
    "del": "1.1.1",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.5",
    "ionic-gulp-browserify-typescript": "^1.0.0",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^1.0.0"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    {
      "locator": "https://github.com/VersoSolutions/CordovaClipboard",
      "id": "com.verso.cordova.clipboard"
    }
  ],
  "cordovaPlatforms": [
    "ios",
    "android"
  ]
}

Hi Urish here is my package.json . I get the error when I declare the TimeAGoPipe in my Component.

{
  "name": "mako",
  "description": "Mako",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/driftyco/ionic-conference-app.git"
  },
  "dependencies": {
    "angular2": "^2.0.0-beta.7",
    "angular2-jwt": "0.1.6",
    "es6-promise": "3.0.2",
    "es6-shim": "^0.35.0",
    "ionic-angular": "2.0.0-beta.3",
    "ionic-native": "^1.1.0",
    "ionicons": "3.0.0-alpha.3",
    "lodash": "^4.6.1",
    "reflect-metadata": "0.1.2",
    "rxjs": "^5.0.0-beta.2",
    "zone.js": "^0.6.6"
  },
  "devDependencies": {
    "babel-preset-es2015": "^6.6.0",
    "del": "1.1.1",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.5",
    "ionic-gulp-browserify-typescript": "^1.0.0",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^1.0.0"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    {
      "locator": "https://github.com/VersoSolutions/CordovaClipboard",
      "id": "com.verso.cordova.clipboard"
    }
  ],
  "cordovaPlatforms": [
    "ios",
    "android"
  ]
}
@lordgreg

This comment has been minimized.

Show comment
Hide comment
@lordgreg

lordgreg Mar 31, 2016

I have a bit different problem, but still related with latest ionic2 project:

 ✗
C:\Development\abcd\node_modules\angular2-moment\CalendarPipe.ts:3
import {Pipe, ChangeDetectorRef, PipeTransform, EventEmitter, OnDestroy} from 'angular2/core';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

I have a bit different problem, but still related with latest ionic2 project:

 ✗
C:\Development\abcd\node_modules\angular2-moment\CalendarPipe.ts:3
import {Pipe, ChangeDetectorRef, PipeTransform, EventEmitter, OnDestroy} from 'angular2/core';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
@wli

This comment has been minimized.

Show comment
Hide comment
@wli

wli Apr 6, 2016

Contributor

I'm seeing the same thing as @lordgreg with ionic@2.0.0-beta.24

Contributor

wli commented Apr 6, 2016

I'm seeing the same thing as @lordgreg with ionic@2.0.0-beta.24

@remithomas

This comment has been minimized.

Show comment
Hide comment
@remithomas

remithomas Apr 14, 2016

I resolved it by adding some options to the gulpfile.js specialy to buildBrowserify options in the task watch. It works !

buildBrowserify({
 watch: true,
 // add this below
 browserifyOptions: {
  cache: {},
  packageCache: {},
  debug: true,
  extensions: ['.js', '.ts']
 }
}).on('end', done);

Modify also the task build

buildBrowserify({
 watch: true,
 browserifyOptions: {
 cache: {},
 packageCache: {},
 debug: true,
 extensions: ['.js', '.ts']
 }
})

remithomas commented Apr 14, 2016

I resolved it by adding some options to the gulpfile.js specialy to buildBrowserify options in the task watch. It works !

buildBrowserify({
 watch: true,
 // add this below
 browserifyOptions: {
  cache: {},
  packageCache: {},
  debug: true,
  extensions: ['.js', '.ts']
 }
}).on('end', done);

Modify also the task build

buildBrowserify({
 watch: true,
 browserifyOptions: {
 cache: {},
 packageCache: {},
 debug: true,
 extensions: ['.js', '.ts']
 }
})
@aramkoukia

This comment has been minimized.

Show comment
Hide comment
@aramkoukia

aramkoukia Apr 24, 2016

I get the same error when I added ng2-uploader component.
Adding the js and ts extension like above didnt fix my issue.

I get the same error when I added ng2-uploader component.
Adding the js and ts extension like above didnt fix my issue.

@urish

This comment has been minimized.

Show comment
Hide comment
@urish

urish May 3, 2016

Owner

should probably be fixed by #34. Please reopen if still relevant

Owner

urish commented May 3, 2016

should probably be fixed by #34. Please reopen if still relevant

@urish urish closed this May 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment