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

Error “Pydio is not defined” when run build-core command in gui.ajax folder #493

Closed
HaiyangZhang1994 opened this issue Jun 20, 2023 · 9 comments

Comments

@HaiyangZhang1994
Copy link

Note: This issue tracker is only used for reporting qualified bugs. Use Pydio Forums for support or feature requests: first-start, install, or config-related troubleshootings will be ignored and closed! Otherwise, please fill all sections below.

📝 Describe the bug

When I try to run “pnpm run build-core” under folder gui.ajax and then make all, seems like the project start and get error “error loading core/pydio.min.js?v=8d99e3b8bcc1269270e895514b7d9833:Pydio is not defined” from webpage, does anyone has the same issue?

⚙️ How-to Reproduce

  1. Use terminal enter gui.ajax's folder
  2. Run "pnpm run build-core"
  3. Run "make all" under main folder
  4. Run "./cells start" under main folder

🩺 Environment / Setup

Complete the following information:

Server Versions:

  • Cells Version 4.2.2
  • MariaDB/MySQL version MySQL 8.0.33
  • Server OS: macOS 12.3.1
  • Other dependencies None

Client used for testing:

  • Browser chrome Version 114.0.5735.133
  • Client OS / mobile device, etc...

Additional context:
Here's the screenshot
image

image image
@HaiyangZhang1994
Copy link
Author

@cdujeu

@cdujeu
Copy link
Member

cdujeu commented Jun 20, 2023

hello, can you give more context why you want to re-build ?
Did you also pnpm run build-libs and pnpm run build-boot ?

Maybe first try to make dev (will use the local JS instead of embed it inside the binary) to validate your JS changes
Also do not forget to env NODE_ENV=production before rebuilding the JS to make sure it is minified

@HaiyangZhang1994
Copy link
Author

hello, can you give more context why you want to re-build ? Did you also pnpm run build-libs and pnpm run build-boot ?

Maybe first try to make dev (will use the local JS instead of embed it inside the binary) to validate your JS changes Also do not forget to env NODE_ENV=production before rebuilding the JS to make sure it is minified

Hi cdujeu, thanks for the reply, actually I tried pnpm run all at first since I made some changes in gui.ajax to adjust some text, but it failed so at last I found that the problem will occur when I run pnpm run build-core

I just tried pnpm run build-core and then run make dev, but it still failed

@HaiyangZhang1994
Copy link
Author

Also I just set NODE_ENV=production when I run webpack.core.js, but I still got Pydio is not defined

@HaiyangZhang1994
Copy link
Author

@cdujeu
Hi cdujeu, just found that the bug is from pydio.boot.min,but dont find where the Pydio is defined

image

@cdujeu
Copy link
Member

cdujeu commented Jun 23, 2023

mmm, if you change gui.ajax, you do not need to recompile the core actually - so maybe try reverting the compiled version of the core lib ?

@HaiyangZhang1994
Copy link
Author

mmm, if you change gui.ajax, you do not need to recompile the core actually - so maybe try reverting the compiled version of the core lib ?

Yeah I just revert the compiled version and everything works well right now, just a little bit curious why rebuild it will cause this bug🤔

@cdujeu
Copy link
Member

cdujeu commented Jun 26, 2023

Very sure it's not a bug (using this every day), but a config/developer setup issue.
Closing, please open a Forum if you want to dig further.

@cdujeu cdujeu closed this as completed Jun 26, 2023
@chaosue
Copy link

chaosue commented Feb 20, 2024

this may be a webpack version problem, refer to https://www.ginkonote.com/users/flo/articles/migration-guide-to-webpack-5@javascript, arguments objects is not available in arrow function.

I resolved this by modify frontend/front-srv/assets/gui.ajax/res/js/core/index.js:178 as below:

        return originalRequire.apply(this, libName);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants