@dingels35 wrote:
After starting a new project and adding a reference to angular2-moment, I'm getting this error:
/Users/corydingels/projects/other/wyb/testapp/node_modules/angular2-moment/TimeAgoPipe.ts:3 import {Pipe, ChangeDetectorRef, PipeTransform, OnDestroy} from 'angular2/core'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'To reproduce:
% ionic start --v2 --ts -t sidemenu testapp % cd testapp % npm i --save angular2-moment// Edit getting-started.ts by adding import line and "pipes: .." line import {CalendarPipe} from 'angular2-moment'; @Page({ templateUrl: 'build/pages/getting-started/getting-started.html', pipes: [CalendarPipe] })% ionic serveNote that I'm getting the same error when trying to add
angular2-jwt.My
ionic info:Cordova CLI: 6.1.0 (cordova-lib@undefined) Ionic Version: 2.0.0-beta.3 Ionic CLI Version: 2.0.0-beta.23 Ionic App Lib Version: 2.0.0-beta.13 ios-deploy version: 1.8.5 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v5.8.0 Xcode version: Xcode 7.2 Build version 7C68
Posts: 2
Participants: 2