warp-contracts / warp

An implementation of the Arweave SmartWeave smart contracts protocol.
MIT License
159 stars 44 forks source link

[BUG] Deploy Plugin: Super constructor null of anonymous class is not a constructor #492

Open Envoy-VC opened 11 months ago

Envoy-VC commented 11 months ago

Describe the bug Bug with Warp Deploy Plugin throwing client side errors in prod

Super constructor null of anonymous class is not a constructor at new <anonymous>

To Reproduce Steps to reproduce the behavior.

Create a basic Nextjs Project Try to create a new warp instance with deploy plugin and run the commands

npm run build && npm start

Expected behavior A new warp instance should be created with Deploy Plugin

Screenshots

SCR-20231217-optt

Desktop (please complete the following information):

Additional context

Tried a simple workaround with webpack config and it works for now, but not sure why this error comes in the first place

In next.config.mjs add a webpack config

const config = {
    // Other config
    webpack: (config, { isServer }) => {
    if (!isServer) {
        config.optimization.innerGraph = false;
    }
    return config;
    },
}

export default config;
nguyentheanionos commented 4 months ago

Have you solved the problem yet? I am also encountering a similar error.

Envoy-VC commented 4 months ago

Have you solved the problem yet? I am also encountering a similar error.

Hey try adding this in your nextjs config

webpack: (config, { isServer }) => {
    if (!isServer) {
        config.optimization.innerGraph = false;
    }
    return config;
},