chahuadev commited on
Commit
375fb36
·
1 Parent(s): 76c8998

Add troubleshooting section to npm README, bump to v1.0.3

Browse files
packages/@chahuadev/chahuadev-hub-app/README.md CHANGED
@@ -11,7 +11,7 @@
11
  <p align="center">
12
  <a href="https://www.npmjs.com/package/@chahuadev/chahuadev-hub-app"><img src="https://img.shields.io/npm/v/@chahuadev/chahuadev-hub-app?style=for-the-badge&color=blue" alt="NPM Version"></a>
13
  <a href="https://www.npmjs.com/package/@chahuadev/chahuadev-hub-app"><img src="https://img.shields.io/npm/dt/@chahuadev/chahuadev-hub-app?style=for-the-badge&color=success" alt="NPM Downloads"></a>
14
- <img src="https://img.shields.io/badge/Platform-Windows-0078D4?style=for-the-badge&logo=windows&logoColor=white" alt="Windows">
15
  <img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" alt="MIT">
16
  </p>
17
 
@@ -23,21 +23,69 @@
23
 
24
  > **Auto-download:** On install, the binary for your platform is downloaded automatically. Use `--foreground-scripts` to see the progress bar.
25
 
26
- ### Global Install (Recommended)
27
 
28
  ```bash
29
  npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
30
  ```
31
 
32
- ### Launch
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  ```bash
 
 
35
  chahuadev-hub
36
  ```
37
 
38
  ---
39
 
40
- ## 🚀 What It Does
41
 
42
  Download and manage all Chahuadev apps in one place — including **Chahuadev Framework**, **Emoji Cleaner**, and **Junk Sweeper** — through a sleek dark-mode GUI.
43
 
 
11
  <p align="center">
12
  <a href="https://www.npmjs.com/package/@chahuadev/chahuadev-hub-app"><img src="https://img.shields.io/npm/v/@chahuadev/chahuadev-hub-app?style=for-the-badge&color=blue" alt="NPM Version"></a>
13
  <a href="https://www.npmjs.com/package/@chahuadev/chahuadev-hub-app"><img src="https://img.shields.io/npm/dt/@chahuadev/chahuadev-hub-app?style=for-the-badge&color=success" alt="NPM Downloads"></a>
14
+ <img src="https://img.shields.io/badge/Platform-Windows%20%7C%20Linux-0078D4?style=for-the-badge" alt="Windows | Linux">
15
  <img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" alt="MIT">
16
  </p>
17
 
 
23
 
24
  > **Auto-download:** On install, the binary for your platform is downloaded automatically. Use `--foreground-scripts` to see the progress bar.
25
 
26
+ ### 🪟 Windows — Global Install
27
 
28
  ```bash
29
  npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
30
  ```
31
 
32
+ ### 🐧 Linux — Global Install
33
+
34
+ Linux requires `sudo` for global npm packages:
35
+
36
+ ```bash
37
+ sudo npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
38
+ ```
39
+
40
+ > **Alternative (no sudo required):** Set npm prefix to your home folder first:
41
+ > ```bash
42
+ > mkdir -p ~/.npm-global
43
+ > npm config set prefix '~/.npm-global'
44
+ > echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
45
+ > source ~/.bashrc
46
+ > ```
47
+ > Then install without sudo:
48
+ > ```bash
49
+ > npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
50
+ > ```
51
+
52
+ ### 🚀 Launch
53
+
54
+ ```bash
55
+ chahuadev-hub
56
+ ```
57
+
58
+ ---
59
+
60
+ ## �️ Troubleshooting
61
+
62
+ ### ENOTEMPTY error on Linux (directory not empty)
63
+
64
+ If you see `ENOTEMPTY` during install, a previous failed install left files behind. Clear them first:
65
+
66
+ ```bash
67
+ # If installed with npm-global prefix
68
+ rm -rf ~/.npm-global/lib/node_modules/@chahuadev/chahuadev-hub-app
69
+ npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
70
+
71
+ # If installed with sudo
72
+ sudo rm -rf /usr/lib/node_modules/@chahuadev/chahuadev-hub-app
73
+ sudo npm install -g @chahuadev/chahuadev-hub-app --foreground-scripts --force
74
+ ```
75
+
76
+ ### Executable not found after install
77
+
78
+ If `chahuadev-hub` command is not found after install, make sure `~/.npm-global/bin` is in your PATH:
79
 
80
  ```bash
81
+ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
82
+ source ~/.bashrc
83
  chahuadev-hub
84
  ```
85
 
86
  ---
87
 
88
+ ## 🚀 What It Does
89
 
90
  Download and manage all Chahuadev apps in one place — including **Chahuadev Framework**, **Emoji Cleaner**, and **Junk Sweeper** — through a sleek dark-mode GUI.
91
 
packages/@chahuadev/chahuadev-hub-app/index.js CHANGED
@@ -11,9 +11,9 @@ const arch = os.arch();
11
  let exeName = '';
12
 
13
  if (platform === 'win32') {
14
- exeName = arch === 'ia32' ? 'chahuadev-hub-win-ia32.exe' : 'chahuadev-hub-win-x64.exe';
15
  } else if (platform === 'linux') {
16
- exeName = 'chahuadev-hub-linux';
17
  } else {
18
  console.error(`❌ Chahuadev Hub does not support ${platform} ${arch} yet.`);
19
  process.exit(1);
 
11
  let exeName = '';
12
 
13
  if (platform === 'win32') {
14
+ exeName = 'chahuadev_hub.exe';
15
  } else if (platform === 'linux') {
16
+ exeName = 'chahuadev_hub';
17
  } else {
18
  console.error(`❌ Chahuadev Hub does not support ${platform} ${arch} yet.`);
19
  process.exit(1);
packages/@chahuadev/chahuadev-hub-app/install.js CHANGED
@@ -11,16 +11,12 @@ let downloadUrl = '';
11
  let fileName = '';
12
 
13
  if (platform === 'win32') {
14
- if (arch === 'ia32') {
15
- downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub-win-ia32.exe?download=true';
16
- fileName = 'chahuadev-hub-win-ia32.exe';
17
- } else {
18
- downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub-win-x64.exe?download=true';
19
- fileName = 'chahuadev-hub-win-x64.exe';
20
- }
21
  } else if (platform === 'linux') {
22
  downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub?download=true';
23
- fileName = 'chahuadev-hub-linux';
24
  }
25
 
26
  if (!downloadUrl) {
@@ -85,7 +81,11 @@ function downloadFile(url, dest) {
85
  console.log(' chahuadev-hub');
86
  console.log(' npx @chahuadev/chahuadev-hub-app\n');
87
 
88
- if (platform !== 'win32') fs.chmodSync(dest, 0o755);
 
 
 
 
89
  });
90
 
91
  }).on('error', (err) => {
 
11
  let fileName = '';
12
 
13
  if (platform === 'win32') {
14
+ // ชื่อไฟล์ตรงกับที่ PyInstaller build ออกมา
15
+ downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub.exe?download=true';
16
+ fileName = 'chahuadev_hub.exe';
 
 
 
 
17
  } else if (platform === 'linux') {
18
  downloadUrl = 'https://huggingface.co/datasets/chahuadev/chahuadev-framework-binaries/resolve/main/chahuadev_hub?download=true';
19
+ fileName = 'chahuadev_hub';
20
  }
21
 
22
  if (!downloadUrl) {
 
81
  console.log(' chahuadev-hub');
82
  console.log(' npx @chahuadev/chahuadev-hub-app\n');
83
 
84
+ // Make executable on Linux/macOS
85
+ if (platform !== 'win32') {
86
+ fs.chmodSync(dest, 0o755);
87
+ console.log(' chmod +x applied');
88
+ }
89
  });
90
 
91
  }).on('error', (err) => {
packages/@chahuadev/chahuadev-hub-app/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@chahuadev/chahuadev-hub-app",
3
- "version": "1.0.0",
4
  "description": "Chahuadev Hub — Official app launcher and distribution hub by Chahuadev",
5
  "main": "index.js",
6
  "bin": {
 
1
  {
2
  "name": "@chahuadev/chahuadev-hub-app",
3
+ "version": "1.0.3",
4
  "description": "Chahuadev Hub — Official app launcher and distribution hub by Chahuadev",
5
  "main": "index.js",
6
  "bin": {