BundlerMinifier icon indicating copy to clipboard operation
BundlerMinifier copied to clipboard

Object reference not set to an instance of an object

Open aymenpeak opened this issue 7 years ago • 13 comments

hey,

it was working just fine until today i opened my project , make some changes in a js file then i tried to bundle using the command line and i got this error

(bundler & minifier) Object reference not set to an instance of an object

any suggestions?!

aymenpeak avatar May 22 '17 13:05 aymenpeak

It seems to be an issue with minifier. Just bundling work fine.

Also css bundling and minifying works just fine.

Did the latest Visual Studio update break anything?

EraYaN avatar Jun 22 '17 15:06 EraYaN

this means there is some issue with the JS you added. It could be you are adding ES 2015 + things? we have a similar issue right now and am trying to fix it.

alokraj68 avatar Feb 12 '20 13:02 alokraj68

Any update on this issue ? what changes caused this problem ?

ErikParso avatar Aug 06 '20 12:08 ErikParso

I had to set minify.enabled to false. Minifier was failing for some reason. Luckily i can set minification in webpack configuration.

ErikParso avatar Aug 06 '20 12:08 ErikParso

I am also facing the same problem.

ghost avatar Sep 29 '20 11:09 ghost

I have the same issue when try to minify bootstrap.bundle.js ([email protected]) BuildBundlerMinifier Version="3.2.449"

MattAfflek avatar May 30 '21 19:05 MattAfflek

I though that this issue was occurring due to the size of the Bootstrap v5 Files. However this can easily be produced by trying to minify any of the bootstrap v5 files.

A-Matt avatar Aug 02 '21 15:08 A-Matt

In my case it was because of the optional chaining operator ?

DmitrySikorsky avatar Aug 19 '21 15:08 DmitrySikorsky

Solved by refactoring all "??" nullish coalescing operators with "?:" conditional (ternary) operators.

alexbetser avatar Sep 20 '21 08:09 alexbetser

Will somebody fix this issue (and other issues), or is this library not maintained by anybody anymore?

M-Rostock avatar Nov 01 '21 09:11 M-Rostock

Just set minify "enabled": false

abbasali-g avatar Feb 22 '22 16:02 abbasali-g

Just set minify "enabled": false

How does that solve the problem of minifying files with nullish coalescing operator?

M-Rostock avatar Feb 22 '22 19:02 M-Rostock

If anyone's reading in 2023, I got around this issue and was able to build successfully with Bootstrap 5 by using Visual Studio 2022 and these extensions:

https://marketplace.visualstudio.com/items?itemName=Failwyn.BundlerMinifier64

https://marketplace.visualstudio.com/items?itemName=Failwyn.WebCompiler64

surenzz avatar Feb 09 '23 16:02 surenzz