-
-
Notifications
You must be signed in to change notification settings - Fork 12
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: You must supply an options object - but options object is being supplied #16
Comments
I was able to solve this using the info in a recent issue posted here (thanks @domoritz): #15 (comment) It seems like the error handling should be updated to inform that the output options are missing, rather than returning an error that the options object is missing. |
This isn't a very frequently maintained package. We'd be happy to review a PR from the community to resolve the issue. |
I've just had this problem to. You need to add a const options = {
input: 'src/js/test.js',
output: { sourcemap: false }
}; That's all it took to get it work. You can even pass through an empty object and it will work. Though I just started using it so I can't say if things will break or not when using more complex code. The example given, which is outdated as well as it's using Gulp 3, is not working anymore. import rollupStream from '@rollup/stream';
import gulp from 'gulp';
import terser from 'gulp-terser';
import source from 'vinyl-source-stream';
gulp.task('rollup', () => {
const options = { input: 'src/index.js' };
return rollupStream(options)
.pipe(source('bundle.js'))
.pipe(terser({ keep_fnames: true, mangle: false }))
.pipe(gulp.dest('dist'));
}); While I'm at it the example to use sourcemaps doesn't work as well because of this: .pipe(sourcemaps.init({ loadMaps: true })) You need a existing sourcemap or this task fails. Since this is a simple example to set things up maybe it would be better to leave the |
I am trying to use this module but it seems to have an issue with the options object. Even though I am providing one, it is returning Error: You must supply an options object. Please see report below.
"rollup": "^2.35.1"
}
How Do We Reproduce?
Minimal repository reproduction: https://github.com/Liam-OShea/RollupIssueReproduction
Expected Behavior
Bundling works without issue
Actual Behavior
Error: You must supply an options object
at getOutputOptionsAndPluginDriver (/Users/liam/Documents/Work/ProofOfConcept/gulpinject/node_modules/rollup/dist/shared/rollup.js:23604:15)
at handleGenerateWrite (/Users/liam/Documents/Work/ProofOfConcept/gulpinject/node_modules/rollup/dist/shared/rollup.js:23587:74)
at Object.generate (/Users/liam/Documents/Work/ProofOfConcept/gulpinject/node_modules/rollup/dist/shared/rollup.js:23548:20)
at build (/Users/liam/Documents/Work/ProofOfConcept/gulpinject/node_modules/@rollup/stream/dist/index.js:10:37)
The text was updated successfully, but these errors were encountered: