@jlongo78/agent-spaces 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/spaces.js +9 -0
- package/package.json +1 -1
package/bin/spaces.js
CHANGED
|
@@ -39,6 +39,14 @@ if (!fs.existsSync(claudeDir)) {
|
|
|
39
39
|
let next;
|
|
40
40
|
if (isStandalone) {
|
|
41
41
|
// npm global install — run the standalone server directly
|
|
42
|
+
// Native modules (better-sqlite3, node-pty) live in the parent package's
|
|
43
|
+
// node_modules, not in the standalone bundle. Add NODE_PATH so they're found.
|
|
44
|
+
const parentNodeModules = path.join(projectDir, 'node_modules');
|
|
45
|
+
const existingNodePath = process.env.NODE_PATH || '';
|
|
46
|
+
const nodePath = existingNodePath
|
|
47
|
+
? `${parentNodeModules}${path.delimiter}${existingNodePath}`
|
|
48
|
+
: parentNodeModules;
|
|
49
|
+
|
|
42
50
|
next = spawn(process.execPath, [standaloneServer], {
|
|
43
51
|
cwd: path.dirname(standaloneServer),
|
|
44
52
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
@@ -47,6 +55,7 @@ if (isStandalone) {
|
|
|
47
55
|
PORT: String(NEXT_INTERNAL_PORT),
|
|
48
56
|
HOSTNAME: '0.0.0.0',
|
|
49
57
|
NODE_ENV: 'production',
|
|
58
|
+
NODE_PATH: nodePath,
|
|
50
59
|
},
|
|
51
60
|
});
|
|
52
61
|
} else {
|