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

Ошибка при сборке #816

Open
nkgreeg opened this issue Sep 19, 2024 · 4 comments
Open

Ошибка при сборке #816

nkgreeg opened this issue Sep 19, 2024 · 4 comments

Comments

@nkgreeg
Copy link

nkgreeg commented Sep 19, 2024

Operating system / Операционная система

Gentoo Base System release 2.15, kernel 6.6.47

Browser / Браузер

Ungoogled Chromium 128.0.6613.137

Userscript manager / Скриптовый движок

[Violentmonkey]

Script version / Версия скрипта

1.6.1 last commit 231432a097a59b1da9d11631e2b6118f596d88c0

Describe the bug / Опишите ошибку

Локальная сборка по инструкции не работает

Клонирую репозиторий

mkdir -p ~/translate
git clone https://github.com/ilyhalight/voice-over-translation
cd ~/translate

Далее по инструкции в REAME.md

npm install --legacy-peer-deps

Получаю лог с ошибкой

npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm error code 1
npm error path /home/noop/transalte/node_modules/postinstall-postinstall
npm error command failed
npm error command sh -c node ./run.js
npm error node:child_process:964
npm error     throw err;
npm error     ^
npm error
npm error Error: Command failed: yarn run postinstall
npm error     at genericNodeError (node:internal/errors:983:15)
npm error     at wrappedFn (node:internal/errors:537:14)
npm error     at checkExecSyncError (node:child_process:889:11)
npm error     at execSync (node:child_process:961:15)
npm error     at Object.<anonymous> (/home/noop/transalte/node_modules/postinstall-postinstall/run.js:15:5)
npm error     at Module._compile (node:internal/modules/cjs/loader:1467:14)
npm error     at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
npm error     at Module.load (node:internal/modules/cjs/loader:1282:32)
npm error     at Module._load (node:internal/modules/cjs/loader:1098:12)
npm error     at TracingChannel.traceSync (node:diagnostics_channel:315:14) {
npm error   status: 1,
npm error   signal: null,
npm error   output: [
npm error     null,
npm error     Buffer(856) [Uint8Array] [
npm error        27,  91,  51,  49, 109,  27,  91,  49, 109,  73, 110, 116,
npm error       101, 114, 110,  97, 108,  32,  69, 114, 114, 111, 114,  27,
npm error        91,  50,  50, 109,  27,  91,  51,  57, 109,  58,  32, 118,
npm error       111, 105,  99, 101,  45, 111, 118, 101, 114,  45, 116, 114,
npm error        97, 110, 115, 108,  97, 116, 105, 111, 110,  64, 119, 111,
npm error       114, 107, 115, 112,  97,  99, 101,  58,  46,  58,  32,  84,
npm error       104, 105, 115,  32, 112,  97,  99, 107,  97, 103, 101,  32,
npm error       100, 111, 101, 115, 110,  39, 116,  32, 115, 101, 101, 109,
npm error        32, 116, 111,  32,
npm error       ... 756 more items
npm error     ],
npm error     Buffer(0) [Uint8Array] []
npm error   ],
npm error   pid: 73900,
npm error   stdout: Buffer(856) [Uint8Array] [
npm error      27,  91,  51,  49, 109,  27,  91,  49, 109,  73, 110, 116,
npm error     101, 114, 110,  97, 108,  32,  69, 114, 114, 111, 114,  27,
npm error      91,  50,  50, 109,  27,  91,  51,  57, 109,  58,  32, 118,
npm error     111, 105,  99, 101,  45, 111, 118, 101, 114,  45, 116, 114,
npm error      97, 110, 115, 108,  97, 116, 105, 111, 110,  64, 119, 111,
npm error     114, 107, 115, 112,  97,  99, 101,  58,  46,  58,  32,  84,
npm error     104, 105, 115,  32, 112,  97,  99, 107,  97, 103, 101,  32,
npm error     100, 111, 101, 115, 110,  39, 116,  32, 115, 101, 101, 109,
npm error      32, 116, 111,  32,
npm error     ... 756 more items
npm error   ],
npm error   stderr: Buffer(0) [Uint8Array] []
npm error }
npm error
npm error Node.js v22.4.1
npm error A complete log of this run can be found in: /home/noop/.npm/_logs/2024-09-19T00_50_39_670Z-debug-0.log

Additional information / Дополнительная информация

Версии

node -v
v22.4.1
npm -v
10.8.1
yarn -v
4.1.0

Полный лог

2024-09-19T00_50_39_670Z-debug-0.log

Установка через yarn

Пакеты успешно устанавливаются при помощи yarn install

Далее, при сборке возникает ошибка

yarn build
development mode:  false
build type:  undefined
asset vot.user.js 370 KiB [compared for emit] (name: main)
orphan modules 218 KiB [orphan] 66 modules
cacheable modules 369 KiB
  modules by path ./src/ 343 KiB
    ./src/index.js + 51 modules 307 KiB [built] [code generated]
    ./src/styles/main.scss 35.3 KiB [built] [code generated]
  modules by path ./node_modules/ 25.9 KiB
    ./node_modules/bowser/es5.js 25.4 KiB [built] [code generated]
    ./node_modules/requestidlecallback-polyfill/index.js 487 bytes [built] [code generated]

ERROR in [eslint] Key "languageOptions": Key "globals": Global "AudioWorkletGlobalScope " has leading or trailing whitespace.

vot.user.js создаётся, но, как видно из сообщения проблема с eslint

Добавление vot.user.js

При добавлении vot.user.js в Violentmonkey 2.23.0 и переходе на YouTube возникает ошибка
image

Содержимое полученного vot.user.js

vot.user.zip

Скрипт из Release

Релизный скрипт при этом работает

@ilyhalight ilyhalight mentioned this issue Sep 19, 2024
@ilyhalight
Copy link
Owner

Исправил

@nkgreeg
Copy link
Author

nkgreeg commented Sep 20, 2024

Проблема НЕ решена. С Варнингами при помощи yarn собирается. При помощи npm нет. Скрипт не работает. Выдаётся невалидный JavaScript, который не парсится. При этом я вижу, что GitHub Action отрабатывает нормально. Возможно, различие в версиях yarn или версии node.

@ilyhalight
Copy link
Owner

ilyhalight commented Sep 20, 2024

Проблема НЕ решена. С Варнингами при помощи yarn собирается. При помощи npm нет. Скрипт не работает. Выдаётся невалидный JavaScript, который не парсится. При этом я вижу, что GitHub Action отрабатывает нормально. Возможно, различие в версиях yarn или версии node.

То, что есть варнинги при сборке это нормально. Возможно, у вас не отрабатывает postinstall скрипт (выше вы кидали скриншот, где он падал с ошибкой, не знаю исправилось ли это), который должен патчить один из пакетов. Можно попробовать вручную прописать npx patch-package или npx patch-package --use-yarn

@nkgreeg
Copy link
Author

nkgreeg commented Sep 21, 2024

Проблема не решена. npm install не работает. Собранное при помощи yarn до сих пор на работает в Violentmonkey. Я не могу согласиться с статусом "Исправлено". Пусть висит.

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

2 participants