Git Product home page Git Product logo

Comments (11)

gombek avatar gombek commented on May 26, 2024 2

Hi. I had the same error:

Cannot read property 'minify' of null

The option that cause it is:

'process.env.NODE_ENV': JSON.stringify('production')

from butternut-webpack-plugin.

balthazar avatar balthazar commented on May 26, 2024

Arrrrgh totally my bad, can you install the 0.0.6 version?

from butternut-webpack-plugin.

estrattonbailey avatar estrattonbailey commented on May 26, 2024

Sweet, thanks!

from butternut-webpack-plugin.

pedronauck avatar pedronauck commented on May 26, 2024

The same error is happening here and I'm using version 0.0.6 😢

from butternut-webpack-plugin.

balthazar avatar balthazar commented on May 26, 2024

Hey pedronauck! Don't cry! 😄
Can you check the content of the package installed? The version in the module package.json is 0.0.6? Checking the unpkg returns me the correct index.js

from butternut-webpack-plugin.

pedronauck avatar pedronauck commented on May 26, 2024

Yes, it's the same file, and that's the error

/Users/pedronauck/Projects/personal/projects/shazam/node_modules/butternut/dist/butternut.cjs.js:1662
				this.alternate.minify( code );
				              ^

TypeError: Cannot read property 'minify' of null

I'm using Webpack 2!

from butternut-webpack-plugin.

balthazar avatar balthazar commented on May 26, 2024

I think this is an issue with butternut itself rather than the module then, a similar issue has been reported in #123, as @estrattonbailey said, you need to remove the -p option.

from butternut-webpack-plugin.

joezimjs avatar joezimjs commented on May 26, 2024

Yup, agree with @gombek. It's breaking when NODE_ENV is "production". If I just change what the DefinePlugin's value for process.env.NODE_ENV equals, it doesn't break anything, but if NODE_ENV is actually set to "production", this error shows up.

Note: I'm currently minifying for both dev and prod, so it's not a simple mistake of not running Butternut in dev.

from butternut-webpack-plugin.

balthazar avatar balthazar commented on May 26, 2024

Reopening for visibility, it's quite annoying that setting the production env does this, since butternut is intended to be run only with this one

from butternut-webpack-plugin.

RReverser avatar RReverser commented on May 26, 2024

Hmm, just run into this, but it looks like relevant issue Rich-Harris/butternut#137 might be already fixed on master, but this plugin depends on "butternut": "^0.3.5" so versions 0.4.* (including latest 0.4.6) are not installed.

@apercu Could you bump the dependency or maybe even make it peerDependency and let people install preferred version of babili on their own?

from butternut-webpack-plugin.

balthazar avatar balthazar commented on May 26, 2024

Bumped all deps in 0.1.0, let me know.

from butternut-webpack-plugin.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.