Open B0yma opened 4 days ago
Which version of emsdk
is installed? Was it installed inside WSL?
Which version of
emsdk
is installed? Was it installed inside WSL?
@levlam yes inside WSL by command - sudo apt install emscripten emscripten is already the newest version (3.1.5~dfsg-3ubuntu1).
It is better to follow README (https://github.com/tdlib/td/tree/master/example/web#building-tdweb-npm-package) and manually download emsdk. Also, make sure that you completed other steps from README, namely, called source ./emsdk_env.sh
before running other scripts.
It is better to follow README (https://github.com/tdlib/td/tree/master/example/web#building-tdweb-npm-package) and manually download emsdk. Also, make sure that you completed other steps from README, namely, called
source ./emsdk_env.sh
before running other scripts.
thanks, with git version compile done
but now on command
./copy-tdlib.sh
there is error:
cp: cannot stat 'build/asmjs/td_asmjs.js.mem': No such file or directory
in dir after this - tdweb\src\prebuilt\release - there are 3 files: td_asmjs.js, td_wasm.js, td_wasm.wasm
after manual copy td_asmjs.js -> td_asmjs.js.mem and command
./build-tdweb.sh
getting this error:
ERROR in ./src/prebuilt/release/td_wasm.js 3:76
Module parse failed: Unexpected token (3:76)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| var createTdwebModule = (() => {
> var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined;
| if (typeof __filename != 'undefined') _scriptName = _scriptName || __filename;
| return (
@ ./src/worker.js (./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js) 272:19-58
after resinstall npm in emsdk env:
this[kHandle] = new _Hash(algorithm, xofLen); ^
Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:133:10) at module.exports (/mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:471:10) at /mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:503:5 at /mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:358:12 at /mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:221:10) at /mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:236:3 at context.callback (/mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:111:13) at /mnt/c/Users/Magz/Desktop/tdlib/example/web/tdweb/node_modules/babel-loader/lib/index.js:51:71 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }
Node.js v18.20.3
getting prev error after command:
export NODE_OPTIONS=--openssl-legacy-provider
Running npm install
in example/web/tdweb
should help to resolve the error this[kHandle] = new _Hash(algorithm, xofLen);
.
@levlam npm install was success but after that with node js 16.20
./build-tdweb.sh
up to date, audited 823 packages in 5s
5 packages are looking for funding
run `npm fund` for details
37 vulnerabilities (1 low, 10 moderate, 19 high, 7 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> tdweb@1.8.1 build
> webpack --mode production
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Hash: 32154dc309c1a3e19b5b
Version: webpack 4.44.1
Time: 23279ms
Built at: 10/14/2024 7:03:22 PM
6 assets
Entrypoint main = tdweb.js
[7] ./src/worker.js 113 bytes {0} [not cacheable] [built]
[9] multi ./src/index.js 28 bytes {0} [built]
[14] ../../src/methods/node.js (ignored) 15 bytes {0} [built]
[17] ./src/index.js + 9 modules 56.6 KiB {0} [built]
| ./src/index.js 31.6 KiB [built]
| ./src/logger.js 1.87 KiB [built]
| + 8 hidden modules
+ 14 hidden modules
Child worker:
5 assets
Entrypoint main = 5f2cf80795a56e78ed02.worker.js
[6] ./src/prebuilt/release/td_wasm.wasm 83 bytes {0} [built]
[7] ./src/prebuilt/release/td_asmjs.js.mem 82 bytes {0} [built]
[9] (webpack)/buildin/global.js 472 bytes {0} [built]
[10] ./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js + 2 modules 70.1 KiB {0} [built]
| ./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js 61.1 KiB [built]
| ./src/logger.js 1.87 KiB [built]
| ./src/wasm-utils.js 7.08 KiB [built]
[11] ./src/prebuilt/release/td_wasm.js 126 KiB {2} [built] [failed] [1 error]
[12] ./src/prebuilt/release/td_asmjs.js 30.1 MiB {1} [built]
+ 7 hidden modules
ERROR in ./src/prebuilt/release/td_wasm.js 8:4836
Module parse failed: Unexpected token (8:4836)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| function(moduleArg = {}) {
|
> var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof
...
();if(shouldRunNow)callMain();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;run();createTdwebModule.ready.FS=Module.FS;
|
|
@ ./src/worker.js (./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js) 272:19-58
Could you check whether the recently pushed to Github version works for you?
asm.js support was removed and package-lock.json file was updated.
I think is work :-) hope is OK
On Thu, 17 Oct 2024, 05:08 Aliaksei Levin, @.***> wrote:
Could you check whether the recently pushed to Github version works for you?
asm.js support was removed and package-lock.json file was updated.
— Reply to this email directly, view it on GitHub https://github.com/tdlib/td/issues/3085#issuecomment-2418051609, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJ4PV47AHIUTPHVTFZU4UFTZ33PVBAVCNFSM6AAAAABP2NUDZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGA2TCNRQHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I am trying to build tdweb for the browser and following the instructions from ReadMe at https://github.com/tdlib/td/tree/master/example/web.
When I try to run ./build-tdlib.sh step I get the following error:
after delete strings in CMakerLists.txt
When I try to run ./build-tdlib.sh step I get the following error:
logs1
logs after command - export CXX="clang++-14" && export CC="clang-14"
Can you please help me with the error? I have wsl ubuntu Ubuntu 22.04.5 LTS Thanks