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

Mobile web failed to build with default configuration #543

Closed
qianwch opened this issue Oct 27, 2022 · 11 comments
Closed

Mobile web failed to build with default configuration #543

qianwch opened this issue Oct 27, 2022 · 11 comments
Labels
confirmed-bug Issues with confirmed bugs fixed Issues that fixed and released

Comments

@qianwch
Copy link

qianwch commented Oct 27, 2022

cd tools/linux
./automate.py server
I would get the error reports:

>> /build/web-apps/vendor/framework7-react/node_modules/ora/index.js:1
>> import process from 'node:process';
>>        ^^^^^^^
>>
>> SyntaxError: Unexpected identifier
>>     at Module._compile (internal/modules/cjs/loader.js:723:23)
>>     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
>>     at Module.load (internal/modules/cjs/loader.js:653:32)
>>     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
>>     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
>>     at Module.require (internal/modules/cjs/loader.js:692:17)
>>     at require (internal/modules/cjs/helpers.js:25:18)
>>     at Object.<anonymous> (/build/web-apps/vendor/framework7-react/build/build.js:2:13)
>>     at Module._compile (internal/modules/cjs/loader.js:778:30)
>>     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

in the out directory, we do not get mobile web pages.
ls build_tools/out/js/onlyoffice/builder/web-apps/apps/documenteditor/mobile/
will get:
dist locale resources

@ShockwaveNN
Copy link
Contributor

Hi.

  1. Try to build it not only server but whole package via ./automate.py without any params
  2. By building mobile client from source code it will not allow editing, since it's not a part of open-source package, it should be built, but will show license warning on opening

@qianwch
Copy link
Author

qianwch commented Oct 28, 2022

Hi.

  1. Try to build it not only server but whole package via ./automate.py without any params
  2. By building mobile client from source code it will not allow editing, since it's not a part of open-source package, it should be built, but will show license warning on opening

I have tested again. With a new installed Ubuntu 16.04 system. And run ./automate.py without any params.
Just no luck. I believe it is problem about the bundled framework7-react.

>> npm
>> WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@2. I'll try to do my best with it!
......
> documenteditor@1.0.1 deploy-word /build/web-apps/vendor/framework7-react
> cross-env TARGET_EDITOR=word NODE_ENV=production node ./build/build.js

error in promise Error: Not supported
    at Object.<anonymous> (/build/web-apps/vendor/framework7-react/build/build.js:8:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

The built target contains no mobile pages. When open with mobile devices, the page will jump to 404 error.

@ShockwaveNN
Copy link
Contributor

@qianwch Ok, thanks I'll recheck

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Oct 29, 2022

Our developers said that there is a possible workaround

Remove web-apps\vendor\framework7-react\node_modules folder and run npm install in web-apps\vendor\framework7-react

And after that continue build process

But I'm not 100% this helps

@qianwch
Copy link
Author

qianwch commented Oct 29, 2022

Our developers said that there is a possible workaround

Remove web-apps\vendor\framework7-react\node_modules folder and run npm install in web-apps\vendor\framework7-react

And after that continue build process

But I'm not 100% this helps

Yes, still no luck.

@maxkadushkin
Copy link
Contributor

which version of nodejs and npm do you use?

@qianwch
Copy link
Author

qianwch commented Oct 29, 2022

The nodejs and npm is auto installed by build_tools, v10.24.1 and 6.14.17.

@qianwch
Copy link
Author

qianwch commented Oct 30, 2022

Now it worked, I need to install nodejs 12.22.12, then run ./automate.py server
It seems that the build script needs to be updated as nodejs 10 does not work.

@qianwch qianwch closed this as completed Oct 30, 2022
@ShockwaveNN ShockwaveNN reopened this Oct 31, 2022
@ShockwaveNN
Copy link
Contributor

Glad that you've figure it out, but there is still some bug

Since we planned that mobile viewers should work with default build config (with nodejs 10)

I've created issue 59569 in our private issue tracker to figure it out

@ShockwaveNN ShockwaveNN added the confirmed-bug Issues with confirmed bugs label Oct 31, 2022
@ShockwaveNN ShockwaveNN changed the title The mobile web client is not included in the build output. Mobile web failed to build with default configuration Oct 31, 2022
@igwyd
Copy link
Member

igwyd commented May 17, 2024

Hello @qianwch, sorry for the late reply. It's fixed some time ago, we up node version to 16.

@Rita-Bubnova
Copy link
Member

I close this issue. Feel free to comment or reopen it if you got further questions.

@Rita-Bubnova Rita-Bubnova added the fixed Issues that fixed and released label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs fixed Issues that fixed and released
Projects
None yet
Development

No branches or pull requests

5 participants