pydio / cells

Future-proof content collaboration platform
https://pydio.com
GNU Affero General Public License v3.0
1.78k stars 173 forks source link

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

Closed HaiyangZhang1994 closed 1 year ago

HaiyangZhang1994 commented 1 year ago

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:

Client used for testing:

Additional context: Here's the screenshot

image image image
HaiyangZhang1994 commented 1 year ago

@cdujeu

cdujeu commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

HaiyangZhang1994 commented 1 year ago

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

image
cdujeu commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.

chaosue commented 6 months ago

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);