Cannot read property 'contexts' of null
JeffML opened this issue · 2 comments
JeffML commented
getting the following error:
node minify
minify temp dir is /tmp
TypeError: unknown: Cannot read property 'contexts' of null
minify is a script I wrote; snippet:
let compressor = require('node-minify'),
os = require('os');
const minify = (options, callback) => {
const jsCompress = options.compress ? 'babel-minify' : 'no-compress'; // Using UglifyJS Compressor for JS
...
Promise.all([
compressor.minify({
compressor: jsCompress,
tempPath: fullTmpDir,
input: [
`${JS_SRCPATH}app.js`,
`${JS_SRCPATH}common.js`,
`${JS_SRCPATH}atlee.js`,
`${JS_SRCPATH}shims.js`,
`${JS_SRCPATH}search.js`,
`${JS_SRCPATH}products/sampleRequest.js`,
],
output: `${JS_SRCPATH}min/baseScripts.min.js`,
}),
...
]);
I found this listed as a workaround, but haven't tried implementing it yet:
babel/minify#933
srod commented
Hey @JeffML, sorry for the delay.
Did you still have your bug ? Because I just tried your code, and I can't reproduce the error.
JeffML commented
Hi,
I switched from babel-minify to uglify-es and that worked. It's a
babel-minify problem.
…On Sat, Mar 23, 2019, 2:25 PM Rodolphe Stoclin ***@***.***> wrote:
Hey @JeffML <https://github.com/JeffML>, sorry for the delay.
Did you still have your bug ? Because I just tried your code, and I can't
reproduce the error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#595 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADVcbcnsWjB_Ptypd6Q5cfngjFrs0qKPks5vZpvEgaJpZM4biHoq>
.