Skip to content
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

Issue in next js #965

Open
devnaelson opened this issue Aug 18, 2023 · 3 comments
Open

Issue in next js #965

devnaelson opened this issue Aug 18, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@devnaelson
Copy link

`

  • wait compiling...
  • event compiled client and server successfully in 506 ms (439 modules)
  • warn Fast Refresh had to perform a full reload due to a runtime error.
  • error node_modules/butterfly-dag/dist/index.js (10:1) @ eval
  • error ReferenceError: self is not defined
    at webpack_require (/var/www/html/micro/butterfly/.next/server/webpack-runtime.js:33:43)
    at eval (./src/app/page.js:7:71)
    at (ssr)/./src/app/page.js (/var/www/html/micro/butterfly/.next/server/app/page.js:1017:1)
    at webpack_require (/var/www/html/micro/butterfly/.next/server/webpack-runtime.js:33:43)
    null
  • error node_modules/butterfly-dag/dist/index.js (10:1) @ eval
  • error ReferenceError: self is not defined
    at webpack_require (/var/www/html/micro/butterfly/.next/server/webpack-runtime.js:33:43)
    at eval (./src/app/page.js:7:71)
    at (ssr)/./src/app/page.js (/var/www/html/micro/butterfly/.next/server/app/page.js:1017:1)
    at webpack_require (/var/www/html/micro/butterfly/.next/server/webpack-runtime.js:33:43)
    null
    `

The current behavior

Broken down when compiling

The expected behavior

Load well

Your environment(such as: Butterfly version、Browser version、OS and so on)

Google chrome, Linux 22 Ubuntu

Butterfly version: 4.3.28

Browser version: 115.0.5790.170

OS: 22.4

@devnaelson devnaelson added the bug Something isn't working label Aug 18, 2023
@noonnightstorm
Copy link
Collaborator

Can you provide an executable example

@devnaelson
Copy link
Author

devnaelson commented Aug 22, 2023

Can you provide an executable example
I can make a video, you can see,

I would wish work with it in next latest.
https://github.com/alibaba/butterfly/assets/35904665/823b74cf-b690-4de7-8132-4227ed963d9c

@fixiabis
Copy link

Can you provide an executable example
I can make a video, you can see,

I would wish work with it in next latest. https://github.com/alibaba/butterfly/assets/35904665/823b74cf-b690-4de7-8132-4227ed963d9c

This issue occurs because directly using a client-side library in Next.js leads to an error. The cause and solution can be referenced in this Stack Overflow post: https://stackoverflow.com/questions/66096260/why-am-i-getting-referenceerror-self-is-not-defined-when-i-import-a-client-side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants