We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I keep getting this error when trying to open live view on single screen:
explored some around and found this issue:
https://stackoverflow.com/questions/43230346/error-spawn-npm-enoent
Based on best answer of the issue, these are the changes which has to be done
windowSimulator.js Lines 14-25:
if (projInfo.devServerScript === 'start') { const child = spawn('npm', ['start'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:3000',child.pid]); }); //Simulation for react-dev-server } else if (projInfo.devServerScript === 'run dev-server') { let child = spawn('npm', ['run', 'reactide-server'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:8085', child.pid]); }) }
Became:
if (projInfo.devServerScript === 'start') { const child = spawn('npm.cmd', ['start'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:3000',child.pid]); }); //Simulation for react-dev-server } else if (projInfo.devServerScript === 'run dev-server') { let child = spawn('npm.cmd', ['run', 'reactide-server'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:8085', child.pid]); }) }
Walla... now it works...
Conclusion:
Windows os has to spawn npm.cmd and not npm, which is fine for other os...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I keep getting this error when trying to open live view on single screen:
explored some around and found this issue:
https://stackoverflow.com/questions/43230346/error-spawn-npm-enoent
Based on best answer of the issue, these are the changes which has to be done
windowSimulator.js Lines 14-25:
if (projInfo.devServerScript === 'start') { const child = spawn('npm', ['start'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:3000',child.pid]); }); //Simulation for react-dev-server } else if (projInfo.devServerScript === 'run dev-server') { let child = spawn('npm', ['run', 'reactide-server'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:8085', child.pid]); }) }
Became:
if (projInfo.devServerScript === 'start') { const child = spawn('npm.cmd', ['start'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:3000',child.pid]); }); //Simulation for react-dev-server } else if (projInfo.devServerScript === 'run dev-server') { let child = spawn('npm.cmd', ['run', 'reactide-server'], {cwd: projInfo.rootPath}); child.stdout.on('data', (data) => { global.mainWindow.webContents.send('start simulator',['http://localhost:8085', child.pid]); }) }
Walla... now it works...
Conclusion:
Windows os has to spawn npm.cmd and not npm, which is fine for other os...
The text was updated successfully, but these errors were encountered: