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

Error Handling Broken? #30

Open
remexre opened this issue Jun 7, 2016 · 2 comments
Open

Error Handling Broken? #30

remexre opened this issue Jun 7, 2016 · 2 comments

Comments

@remexre
Copy link

remexre commented Jun 7, 2016

gulp.task("js:editor", () =>
    gulp.src("src/editor/editor.js", {read: false})
    // .pipe(plumber())
    // .pipe(xo())
    .pipe(rollup({
        format:    "I think error handling is broken...",
        // plugins:   rollupPlugins,
        sourceMap: true,
    }))
    // .pipe(uglify())
    .pipe(sourcemaps.write())
        .pipe(gulp.dest("dist/")));
sh-4.3$ gulp js:editor
(node:24325) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[20:49:09] Using gulpfile ~/Desktop/project-domino-client/gulpfile.js
[20:49:09] Starting 'js:editor'...
sh-4.3$
@remexre
Copy link
Author

remexre commented Jun 7, 2016

Okay, it works if I replace the format with something valid (in my case, umd and then adding a moduleId), uncomment everything, and comment out all export statements from src/editor/editor.js. So... exporting might be broken instead?

@remexre
Copy link
Author

remexre commented Jun 7, 2016

If I do the following, it reports the error that I need to use moduleName instead of moduleId:

diff --git a/index.js b/index.js
index b0f5f46..91a13a6 100644
--- a/index.js
+++ b/index.js
@@ -49,7 +49,7 @@ module.exports = function(options) {
             file.sourceMap = map;
           }
           callback(null, file);
-        }, function(err) {
+        }).catch(function(err) {
           setImmediate(function() {
             callback(new PluginError(PLUGIN_NAME, err));
           });

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

1 participant