[GH-ISSUE #35] ui-payment > build > error #6

Closed
opened 2026-03-03 18:51:30 +03:00 by kerem · 12 comments
Owner

Originally created by @naddika on GitHub (Sep 11, 2023).
Original GitHub issue: https://github.com/oxygenpay/oxygen/issues/35

Originally assigned to: @swift1337 on GitHub.

cd ui-payment
yarn install

[1/4] Resolving packages...
............................

$ husky install
husky - .git can't be found (see https://typicode.github.io/husky/#/?id=custom-directory)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Originally created by @naddika on GitHub (Sep 11, 2023). Original GitHub issue: https://github.com/oxygenpay/oxygen/issues/35 Originally assigned to: @swift1337 on GitHub. ``` cd ui-payment yarn install [1/4] Resolving packages... ............................ $ husky install husky - .git can't be found (see https://typicode.github.io/husky/#/?id=custom-directory) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. ```
kerem 2026-03-03 18:51:30 +03:00
Author
Owner

@swift1337 commented on GitHub (Sep 11, 2023):

Hey! Could you describe the use-case for building custom frontend?

<!-- gh-comment-id:1714636097 --> @swift1337 commented on GitHub (Sep 11, 2023): Hey! Could you describe the use-case for building custom frontend?
Author
Owner

@naddika commented on GitHub (Sep 12, 2023):

Where is custom frontend here? What would be non-custom one then?

<!-- gh-comment-id:1714783855 --> @naddika commented on GitHub (Sep 12, 2023): Where is custom frontend here? What would be non-custom one then?
Author
Owner

@swift1337 commented on GitHub (Sep 12, 2023):

Docker image is built with both dashboard UI and payment UI embedded into binary. I assume you want to change something and build the binary by yourself. Hence

Could you describe the use-case for building custom frontend?

<!-- gh-comment-id:1716351837 --> @swift1337 commented on GitHub (Sep 12, 2023): Docker image is [built](https://github.com/oxygenpay/oxygen/blob/main/.github/workflows/release.yml#L9) with both dashboard UI and payment UI embedded into binary. I assume you want to change something and build the binary by yourself. Hence > Could you describe the use-case for building custom frontend?
Author
Owner

@naddika commented on GitHub (Sep 13, 2023):

Change - not, build by myself - yes. Does it matter?

<!-- gh-comment-id:1716848740 --> @naddika commented on GitHub (Sep 13, 2023): Change - not, build by myself - yes. Does it matter?
Author
Owner

@swift1337 commented on GitHub (Sep 13, 2023):

Does it matter?

Yep, we want to improve developer experience by collecting use-cases outside of the default setup (i.e. running via published docker image).

Regarding your question, you can follow gh action script to reproduce the same build:

  • Put desired vars in .env
  • Run npm ci --ignore-scripts
  • Run npx tsc && npx vite build --base='/p/'
<!-- gh-comment-id:1718089646 --> @swift1337 commented on GitHub (Sep 13, 2023): > Does it matter? Yep, we want to improve developer experience by collecting use-cases outside of the default setup (i.e. running via published docker image). Regarding your question, you can follow gh action script to reproduce the same build: - Put desired vars in `.env` - Run `npm ci --ignore-scripts` - Run `npx tsc && npx vite build --base='/p/'`
Author
Owner

@naddika commented on GitHub (Sep 15, 2023):

Yep, we want to improve developer experience by collecting use-cases outside of the default setup (i.e. running via published docker image).

Docker is a piece of shit.

<!-- gh-comment-id:1720312280 --> @naddika commented on GitHub (Sep 15, 2023): > Yep, we want to improve developer experience by collecting use-cases outside of the default setup (i.e. running via published docker image). Docker is a piece of shit.
Author
Owner

@naddika commented on GitHub (Sep 15, 2023):

% cd ui-payment
%npm ci --ignore-scripts
% npx tsc && npx vite build --base='/p/'
failed to load config from /home/naddika/oxygen/ui-payment/vite.config.ts
error during build:
TypeError: Cannot redefine property: File
    at Function.defineProperty (<anonymous>)
    at Object.<anonymous> (/home/naddika/oxygen/ui-payment/node_modules/@babel/core/lib/index.js:7:8)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/home/naddika/oxygen/ui-payment/node_modules/@babel/core/lib/config/helpers/config-api.js:16:9)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)


% ls vite.config.ts                     
vite.config.ts
<!-- gh-comment-id:1720317655 --> @naddika commented on GitHub (Sep 15, 2023): ``` % cd ui-payment %npm ci --ignore-scripts % npx tsc && npx vite build --base='/p/' failed to load config from /home/naddika/oxygen/ui-payment/vite.config.ts error during build: TypeError: Cannot redefine property: File at Function.defineProperty (<anonymous>) at Object.<anonymous> (/home/naddika/oxygen/ui-payment/node_modules/@babel/core/lib/index.js:7:8) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Module._load (node:internal/modules/cjs/loader:938:12) at Module.require (node:internal/modules/cjs/loader:1115:19) at require (node:internal/modules/helpers:130:18) at Object.<anonymous> (/home/naddika/oxygen/ui-payment/node_modules/@babel/core/lib/config/helpers/config-api.js:16:9) at Module._compile (node:internal/modules/cjs/loader:1241:14) % ls vite.config.ts vite.config.ts ```
Author
Owner

@swift1337 commented on GitHub (Sep 17, 2023):

 ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ nvm use                                                    
Found '/Users/abc/Code/o2pay/oxygen/ui-dashboard/.nvmrc' with version <16.13.0>
Now using node v16.13.0 (npm v8.1.0)
 ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ npm ci --ignore-scripts 

added 548 packages, and audited 549 packages in 31s

137 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice 
npm notice New major version of npm available! 8.1.0 -> 10.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.1.0
npm notice Run npm install -g npm@10.1.0 to update!
npm notice 
 ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ npx tsc && npx vite build --base='/p/' 
vite v4.4.7 building for production...
✓ 6482 modules transformed.
dist/assets/tron-5b6b6483.svg            0.43 kB │ gzip:   0.31 kB
dist/assets/eth-1f94df85.svg             0.53 kB │ gzip:   0.28 kB
dist/assets/arrow-up-d1a531a7.svg        0.76 kB │ gzip:   0.39 kB
dist/assets/arrow-down-ea43cf9f.svg      0.77 kB │ gzip:   0.39 kB
dist/assets/busd-a6ab749c.svg            0.86 kB │ gzip:   0.47 kB
dist/index.html                          0.90 kB │ gzip:   0.43 kB
dist/assets/matic-479d03ee.svg           1.02 kB │ gzip:   0.48 kB
dist/assets/usdt-337d36c2.svg            1.07 kB │ gzip:   0.52 kB
dist/assets/bnb-d068cbf5.svg             1.61 kB │ gzip:   0.73 kB
dist/assets/usdc-913adf09.svg            1.70 kB │ gzip:   0.70 kB
dist/assets/index-7de3f4c4.css           4.89 kB │ gzip:   1.41 kB
dist/assets/tron-167e02ed.js             0.62 kB │ gzip:   0.43 kB
dist/assets/eth-59de992b.js              0.81 kB │ gzip:   0.40 kB
dist/assets/arrow-up-49a1cfc5.js         0.92 kB │ gzip:   0.52 kB
dist/assets/arrow-down-ba5fc5fb.js       0.94 kB │ gzip:   0.51 kB
dist/assets/busd-88859388.js             1.02 kB │ gzip:   0.55 kB
dist/assets/matic-7f5c3fd9.js            1.21 kB │ gzip:   0.60 kB
dist/assets/usdt-a3321d3c.js             1.31 kB │ gzip:   0.64 kB
dist/assets/bnb-cb17ca65.js              1.69 kB │ gzip:   0.74 kB
dist/assets/usdc-6c2da4e2.js             1.89 kB │ gzip:   0.83 kB
dist/assets/index-78303a53.js        1,565.97 kB │ gzip: 489.28 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 7.61s
 ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ 
<!-- gh-comment-id:1722539885 --> @swift1337 commented on GitHub (Sep 17, 2023): ```shell  ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ nvm use Found '/Users/abc/Code/o2pay/oxygen/ui-dashboard/.nvmrc' with version <16.13.0> Now using node v16.13.0 (npm v8.1.0)  ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ npm ci --ignore-scripts added 548 packages, and audited 549 packages in 31s 137 packages are looking for funding run `npm fund` for details found 0 vulnerabilities npm notice npm notice New major version of npm available! 8.1.0 -> 10.1.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.1.0 npm notice Run npm install -g npm@10.1.0 to update! npm notice  ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ npx tsc && npx vite build --base='/p/' vite v4.4.7 building for production... ✓ 6482 modules transformed. dist/assets/tron-5b6b6483.svg 0.43 kB │ gzip: 0.31 kB dist/assets/eth-1f94df85.svg 0.53 kB │ gzip: 0.28 kB dist/assets/arrow-up-d1a531a7.svg 0.76 kB │ gzip: 0.39 kB dist/assets/arrow-down-ea43cf9f.svg 0.77 kB │ gzip: 0.39 kB dist/assets/busd-a6ab749c.svg 0.86 kB │ gzip: 0.47 kB dist/index.html 0.90 kB │ gzip: 0.43 kB dist/assets/matic-479d03ee.svg 1.02 kB │ gzip: 0.48 kB dist/assets/usdt-337d36c2.svg 1.07 kB │ gzip: 0.52 kB dist/assets/bnb-d068cbf5.svg 1.61 kB │ gzip: 0.73 kB dist/assets/usdc-913adf09.svg 1.70 kB │ gzip: 0.70 kB dist/assets/index-7de3f4c4.css 4.89 kB │ gzip: 1.41 kB dist/assets/tron-167e02ed.js 0.62 kB │ gzip: 0.43 kB dist/assets/eth-59de992b.js 0.81 kB │ gzip: 0.40 kB dist/assets/arrow-up-49a1cfc5.js 0.92 kB │ gzip: 0.52 kB dist/assets/arrow-down-ba5fc5fb.js 0.94 kB │ gzip: 0.51 kB dist/assets/busd-88859388.js 1.02 kB │ gzip: 0.55 kB dist/assets/matic-7f5c3fd9.js 1.21 kB │ gzip: 0.60 kB dist/assets/usdt-a3321d3c.js 1.31 kB │ gzip: 0.64 kB dist/assets/bnb-cb17ca65.js 1.69 kB │ gzip: 0.74 kB dist/assets/usdc-6c2da4e2.js 1.89 kB │ gzip: 0.83 kB dist/assets/index-78303a53.js 1,565.97 kB │ gzip: 489.28 kB (!) Some chunks are larger than 500 kBs after minification. Consider: - Using dynamic import() to code-split the application - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. ✓ built in 7.61s  ▸ ~/Code/o2pay/oxygen/ui-dashboard ▸ git:develop ▸ ```
Author
Owner

@swift1337 commented on GitHub (Sep 17, 2023):

@naddika I want to warn that you attitude is a bit disrespectful.

<!-- gh-comment-id:1722540214 --> @swift1337 commented on GitHub (Sep 17, 2023): @naddika I want to warn that you attitude is a bit disrespectful.
Author
Owner

@naddika commented on GitHub (Sep 18, 2023):

@swift1337 just a bit? That's ok. I thought it was too much disrespectful.

<!-- gh-comment-id:1722636406 --> @naddika commented on GitHub (Sep 18, 2023): @swift1337 just a bit? That's ok. I thought it was too much disrespectful.
Author
Owner

@naddika commented on GitHub (Sep 18, 2023):

git:develop

why are you on the develop branch? it's not identical to the master one

the current version of node, which I use too, is 20, whereas you use the 16th

<!-- gh-comment-id:1722638316 --> @naddika commented on GitHub (Sep 18, 2023): > git:develop why are you on the `develop` branch? it's not identical to the master one the current version of node, which I use too, is 20, whereas you use the 16th
Author
Owner

@naddika commented on GitHub (Sep 18, 2023):

the same error on the develop

<!-- gh-comment-id:1722647156 --> @naddika commented on GitHub (Sep 18, 2023): the same error on the `develop`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/oxygen#6
No description provided.