mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 17:09:47 -05:00
fix: windows compatibility
This commit is contained in:
@@ -388,7 +388,12 @@ async function main() {
|
||||
|
||||
// Run next build
|
||||
console.log('\nBuilding Next.js application...');
|
||||
execSync('next build', { cwd: projectRoot, stdio: 'inherit' });
|
||||
const nextBin = path.normalize(path.join(projectRoot, 'node_modules', '.bin', 'next'));
|
||||
execSync(`"${nextBin}" build`, {
|
||||
cwd: projectRoot,
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
|
||||
console.log('\n✨ Build complete! Your frame is ready for deployment. 🪐');
|
||||
console.log('📝 Make sure to configure the environment variables from .env in your hosting provider');
|
||||
|
||||
@@ -245,7 +245,10 @@ async function getGitRemote() {
|
||||
|
||||
async function checkVercelCLI() {
|
||||
try {
|
||||
execSync('vercel --version', { stdio: 'ignore' });
|
||||
execSync('vercel --version', {
|
||||
stdio: 'ignore',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
@@ -254,7 +257,10 @@ async function checkVercelCLI() {
|
||||
|
||||
async function installVercelCLI() {
|
||||
console.log('Installing Vercel CLI...');
|
||||
execSync('npm install -g vercel', { stdio: 'inherit' });
|
||||
execSync('npm install -g vercel', {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
}
|
||||
|
||||
async function loginToVercel() {
|
||||
@@ -383,7 +389,8 @@ async function deployToVercel(useGitHub = false) {
|
||||
console.log('\n⚠️ Note: choosing a longer, more unique project name will help avoid conflicts with other existing domains\n');
|
||||
execSync('vercel', {
|
||||
cwd: projectRoot,
|
||||
stdio: 'inherit'
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
|
||||
// Load project info from .vercel/project.json
|
||||
|
||||
@@ -128,14 +128,13 @@ async function startDev() {
|
||||
}
|
||||
|
||||
// Start next dev with appropriate configuration
|
||||
const nextBin = process.platform === 'win32'
|
||||
? path.join(projectRoot, 'node_modules', '.bin', 'next.cmd')
|
||||
: path.join(projectRoot, 'node_modules', '.bin', 'next');
|
||||
const nextBin = path.normalize(path.join(projectRoot, 'node_modules', '.bin', 'next'));
|
||||
|
||||
nextDev = spawn(nextBin, ['dev'], {
|
||||
stdio: 'inherit',
|
||||
env: { ...process.env, NEXT_PUBLIC_URL: frameUrl, NEXTAUTH_URL: frameUrl },
|
||||
cwd: projectRoot
|
||||
cwd: projectRoot,
|
||||
shell: process.platform === 'win32' // Add shell option for Windows
|
||||
});
|
||||
|
||||
// Handle cleanup
|
||||
|
||||
Reference in New Issue
Block a user