Run WeChat Web Dev Tools on Linux: Step‑by‑Step Guide with NW.js & Wine
Learn how to install and configure the WeChat Web Developer Tools on Linux by downloading NW.js, copying necessary files, fixing module name case issues, creating a run‑detectors file, installing Wine, and adjusting project settings for smooth development.
1. Download NW.js
Download the NW.js SDK from http://nwjs.io/ and extract it.
2. Copy WeChat Web Developer Tool files into NW.js
Copy package.nw, icon.ico, and the WeChat Web Developer Tool executable (or its extracted contents) from the Windows installation folder into the extracted NW.js directory.
3. Modify code to fix module names
Run NW.js from the terminal with ./nw. When errors such as “Cannot find module …” appear, edit the indicated files to correct case‑sensitive module names (e.g., change appServiceConfig to appserviceConfig).
4. Create a run-detectors file
In the WeChat mini‑program project folder, create an empty file named run-detectors. Linux treats files without extensions as directories, so this file prevents “file not found” errors.
5. Install Wine
Install Wine with sudo apt-get install wine. Then run wcc.exe (located in /home/username/.config/微信web开发者工具/WeappVendor) using Wine’s right‑click “Open with Wine” option, installing any required dependencies.
6. Load the project
Before loading, run wcc.exe and wcsc.exe under Wine once; otherwise the first load may fail. After the first load, compilation may take 3–10 seconds, then speeds up due to caching. Rename wcc.exe and wcsc.exe to remove the .exe extension, and edit the paths in commit/build.js, trans/transWxmlToJs.js, and utils/vendorManager.js accordingly.
7. Configure the editor
Use WebStorm (or another IDE) and add wxss to the CSS file type and wxml to the HTML file type in the editor’s file‑type settings. Avoid using the built‑in editor’s edit function, which may cause errors.
Note that automatic refresh after file changes takes about 3–5 seconds for compilation.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
