idea-manager 0.8.2 → 0.8.4
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/package.json +1 -1
- package/src/cli.ts +11 -2
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -64,8 +64,17 @@ program
|
|
|
64
64
|
console.log(`\n IM - Idea Manager v2`);
|
|
65
65
|
console.log(` Starting on http://localhost:${port}\n`);
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
// Resolve next CLI directly — avoids .bin symlink issues on Windows
|
|
68
|
+
// and npm global install hoisting issues
|
|
69
|
+
let nextCli: string;
|
|
70
|
+
try {
|
|
71
|
+
nextCli = require.resolve('next/dist/bin/next', { paths: [PKG_ROOT] });
|
|
72
|
+
} catch {
|
|
73
|
+
// Fallback: try to find next package manually
|
|
74
|
+
nextCli = path.join(PKG_ROOT, 'node_modules', 'next', 'dist', 'bin', 'next');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const child = spawn(process.execPath, [nextCli, 'dev', '-p', port], {
|
|
69
78
|
cwd: PKG_ROOT,
|
|
70
79
|
stdio: 'inherit',
|
|
71
80
|
env: { ...process.env, NODE_ENV: 'development' },
|