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 when using entry_point and STRICT dependency mode, can't find entry point. #53

Closed
dashersw opened this issue Jan 3, 2017 · 4 comments

Comments

@dashersw
Copy link
Contributor

dashersw commented Jan 3, 2017

Hello,

I receive an error ERROR - required entry point "index" never provided when I use entry_point alongside dependency_mode: 'STRICT'. I'm using the gulp task example as the basis.

Here's the gulp config:

var gulp = require('gulp');

var closureCompiler = require('google-closure-compiler').gulp();

gulp.task('default', function() {
    return gulp.
        src('./src/**/*.js').
        pipe(closureCompiler({
            compilation_level: 'ADVANCED_OPTIMIZATIONS',
            warning_level: 'VERBOSE',
            language_in: 'ECMASCRIPT6_STRICT',
            language_out: 'ECMASCRIPT5_STRICT',
            output_wrapper: '(function(){\n%output%\n}).call(this)',
            js_output_file: 'output.min.js',
            dependency_mode: 'STRICT',
            js_module_root: '/src',
            process_common_js_modules: true,
            entry_point: 'index'
        })).
        pipe(gulp.dest('./'));
});

Actually, I made this into a demo here.

The last time this worked correctly was version 20160208.7.0. Any version from that time on fails with the same error.

Any help would be appreciated.

@ChadKillingsworth
Copy link
Collaborator

I'll be improving this soon (and getting better documentation). The js_module_root flag doesn't work well right now.

For the entry point itself, make sure to start it with /index or ./index. I'm not sure which combination you'll need.

@dashersw
Copy link
Contributor Author

dashersw commented Jan 3, 2017

Unfortunately, neither /index nor ./index works, with or without js_module_root. I get the same error.

@ChadKillingsworth
Copy link
Collaborator

Try with a .js extension on the entry point.

@dashersw
Copy link
Contributor Author

dashersw commented Jan 3, 2017

It worked with entry_point: '/src/index'. It also works with /src/index.js, and doesn't depend on the value of js_module_root.

Thanks!

@dashersw dashersw closed this as completed Jan 4, 2017
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

2 participants