Closed pablodoble closed 7 years ago
@flauc
Hi, I can confirm I have the same problem. However when I use version 0.4.41, I get errors during the minification process when using this library:
events.js:141 throw er; // Unhandled 'error' event ^ GulpUglifyError: unable to minify JavaScript at createError (C:\Users\Owner\Documents\Repositories\project\node_modules\gulp-uglify\lib\create-error.js:6:14) at wrapper (C:\Users\Owner\Documents\Repositories\project\node_modules\gulp-uglify\node_modules\lodash\_createHybrid.js:87:15) at trycatch (C:\Users\Owner\Documents\Repositories\project\node_modules\gulp-uglify\minifier.js:26:12) at DestroyableTransform.minify [as _transform] (C:\Users\Owner\Documents\Repositories\project\node_modules\gulp-uglify\minifier.js:76:19) at DestroyableTransform.Transform._read (C:\Users\Owner\Documents\Repositories\project\node_modules\readable-stream\lib\_stream_transform.js:159:10) at DestroyableTransform.Transform._write (C:\Users\Owner\Documents\Repositories\project\node_modules\readable-stream\lib\_stream_transform.js:147:83) at doWrite (C:\Users\Owner\Documents\Repositories\project\node_modules\readable-stream\lib\_stream_writable.js:313:64) at writeOrBuffer (C:\Users\Owner\Documents\Repositories\project\node_modules\readable-stream\lib\_stream_writable.js:302:5) at DestroyableTransform.Writable.write (C:\Users\Owner\Documents\Repositories\project\node_modules\readable-stream\lib\_stream_writable.js:241:11) at write (C:\Users\Owner\Documents\Repositories\project\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:623:24) at flow (C:\Users\Owner\Documents\Repositories\project\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:632:7) at DestroyableTransform.pipeOnReadable (C:\Users\Owner\Documents\Repositories\project\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:664:5) at emitNone (events.js:67:13) at DestroyableTransform.emit (events.js:166:7) at emitReadable_ (C:\Users\Owner\Documents\Repositories\project\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:448:10) at emitReadable (C:\Users\Owner\Documents\Repositories\project\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:444:5)
Thanks!
Hey,
Sorry for not responding earlier I'm really short on time these days. Could one of you maybe share the environment you are using, so i can try to bug fix with it?
Thanks for pointing out the error 👍
Hi!
I'm using Angular2@2.1.2 + Typescript + Browserify + Gulp + BrowserSync. Here you have my complete dependencies:
"dependencies": { "@angular/common": "^2.1.0", "@angular/compiler": "^2.1.0", "@angular/core": "^2.1.0", "@angular/forms": "^2.1.0", "@angular/http": "^2.1.0", "@angular/platform-browser": "^2.1.0", "@angular/platform-browser-dynamic": "^2.1.0", "@angular/router": "^3.1.0", "angular-2-local-storage": "0.0.20", "angular2-moment": "^1.0.0-beta.5", "angular2-notifications": "0.4.41", "bootstrap": "^3.3.7", "es6-shim": "^0.35.1", "intl": "^1.2.5", "ng2-sidebar": "^1.6.1", "ng2-webstorage": "^1.3.4", "reflect-metadata": "^0.1.8", "rxjs": "^5.0.0-rc.1", "ts-helpers": "^1.1.2", "ui-router-ng2": "^1.0.0-beta.3", "video.js": "^5.11.9", "videojs-contrib-hls": "^3.6.6", "web-animations-js": "^2.2.2", "zone.js": "^0.6.26" }, "devDependencies": { "@types/chai": "3.4.34", "@types/es6-shim": "^0.31.32", "@types/jasmine": "^2.5.35", "@types/node": "^6.0.45", "@types/sinon": "1.16.31", "@types/sinon-chai": "2.7.27", "babel-polyfill": "^6.16.0", "babel-preset-es2015": "^6.18.0", "browser-sync": "^2.17.3", "browserify": "^13.1.0", "chai": "^3.5.0", "codelyzer": "^1.0.0-beta.3", "compression": "^1.6.2", "gulp": "^3.9.1", "gulp-angular-embed-templates": "^2.3.0", "gulp-angular2-embed-sass": "^0.3.0", "gulp-babel": "^6.1.2", "gulp-clean": "^0.3.2", "gulp-copy": "0.0.2", "gulp-if": "^2.0.2", "gulp-less": "^3.1.0", "gulp-rename": "^1.2.2", "gulp-replace": "^0.5.4", "gulp-tslint": "^6.1.2", "gulp-typescript": "^3.0.2", "gulp-uglify": "^2.0.0", "gulp-util": "^3.0.7", "harmony-collections": "^0.3.8", "isstream": "^0.1.2", "jasmine": "^2.5.2", "karma": "^1.3.0", "karma-browserify": "^5.1.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.2.0", "karma-phantomjs-launcher": "^1.0.2", "karma-sinon": "^1.0.5", "mocha-teamcity-reporter": "^1.1.1", "phantomjs-prebuilt": "^2.1.13", "pipe-error-stop": "0.0.11", "rimraf": "^2.5.4", "rollupify": "^0.3.5", "run-sequence": "^1.2.2", "sinon": "^1.17.6", "sinon-chai": "^2.8.0", "sprintf-js": "^1.0.3", "teamcity-package-reporter": "^3.1.0", "through2": "^2.0.1", "tsify": "^2.0.2", "tslint": "^3.15.1", "typescript": "^2.0.3", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0", "watchify": "^3.7.0" }
Thanks in advance.
My temporary solution, I removed the .ts files :see_no_evil:
const del = require('del');
gulp.task('prod:clean', function () {
return del([
'node_modules/angular2-notifications/**/*.ts',
'!node_modules/angular2-notifications/**/*.d.ts',
'dist/*',
], {force: true});
});
@pablodoble
@jhonmike probably not the best solution but useful until the bug is fixed. Thanks!
Should be working nicely on newest version now, let me know if you are still getting it.
@flauc hi, I'm still having this issue with version 0.7.4. *.ts files still seem to appear inside the npm package.
@flauc Newest version still has the exact same problem. Not sure what changes you added...
Hi @flauc
Importing angular2-notifications on an angular2 project causes the following error on compiling time:
error TS6059: File 'c:/.../node_modules/angular2-notifications/src/icons.ts' is not under 'rootDir' 'c:\...\app\'. 'rootDir' is expected to contain all source files. ...
This error could be raised because .ts files are included on the npm package. Downgrading to 0.4.41 fixes the problem.
Thanks for the library btw!