dougludlow / ng2-bs3-modal

Angular Bootstrap 3 Modal Component
http://dougludlow.github.io/ng2-bs3-modal/
ISC License
261 stars 133 forks source link

component/modal.d.ts fails on compile #123

Closed EddyP23 closed 8 years ago

EddyP23 commented 8 years ago

Hi,

I imported ng2-bs3-modal as a dependency in package.json and also imported it into my module of Angular 2 app. Whenever I try running gulp serve-dev it fails with the following:

============ Angular 2 Starter ============ Current environment: development

[13:14:52] Using gulpfile ~\Source\Repos\yyy\gulpfile.js [13:14:52] Starting 'sass'... [13:14:52] Starting 'clean-ts-app'... [13:14:52] Starting 'env'... [13:14:52] Starting 'watch-ts'... [13:14:52] Finished 'watch-ts' after 99 ms [13:14:52] Starting 'watch-sass'... [13:14:52] Finished 'watch-sass' after 8.31 ms [13:14:53] src/app/shared/constant/env.ts is generated successfully [13:14:53] Finished 'env' after 205 ms [13:14:53] Finished 'clean-ts-app' after 258 ms [13:14:53] Starting 'tsc-app'... [13:14:53] Finished 'sass' after 853 ms C:/Users/xxx/Source/Repos/yyy/node_modules/ng2-bs3-modal/components/modal.d.ts(16,14): error TS1005: '=' expected.

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start" npm ERR! node v6.5.0 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE npm ERR! support-tool@1.0.0 start: gulp serve-dev npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the support-tool@1.0.0 start script 'gulp serve-dev'. 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 support-tool package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! gulp serve-dev npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs support-tool npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls support-tool npm ERR! There is likely additional logging output above.

Gulp versions I am using are: "gulp": "^3.9.1", "gulp-cssnano": "^2.1.2", "gulp-if": "~2.0.1", "gulp-protractor": "^3.0.0", "gulp-rev": "^7.1.2", "gulp-rev-replace": "^0.4.3", "gulp-sass": "^2.3.2", "gulp-sourcemaps": "^1.6.0", "gulp-template": "^4.0.0", "gulp-tslint": "6.1.1", "gulp-typescript": "~2.13.6", "gulp-uglify": "~2.0.0", "gulp-useref": "~3.1.2",

I tried updating 'gulp-typescript' version, but then start getting other weird errors.

Also, whenever I remove import and leave it as it is in package.json, then my app loads fine producing

ng2-bs3-modal.js:18 Uncaught ReferenceError: System is not defined

Any ideas why this is failing?

dougludlow commented 8 years ago

@EddyP23, what's your actually typescript version (not gulp-typescript)? ng2-bs3-modal requires typescript 2.0 or later. This error indicates that your version is most likely not greater than 2.

EddyP23 commented 8 years ago

@dougludlow Thanks, that helped! My typescript version was around 1.8.x, after upgrading it to 2.x it fixed the issue!