Comments (13)
hi Jerome,
I'm not sure but i think it's related to the use of spawn, in the 'Gruntfile.js', on windows.
If you are on windows that might explain your problem.
Here the issue related to the problem on the node project: nodejs/node-v0.x-archive#2318
The issue is still opened though.
A solution would be to replace spawn by win-spawn:
- npm install win-spawn
- Replace the line in the Gruntfile.js:
var spawn = require('child_process').spawn;
by
var spawn = require('win-spawn');
from generator-ionic.
What version of node do you have installed? Try updating your installed gems, and running brew update. I had some issues like this on other generators and it always came back to something needed to be updated on my end
from generator-ionic.
Jerome,
Can you give us some more information about what operating system you're on and what version of Node.js you're using?
I was unable to reproduce this issue, so if the above mentioned suggestions haven't resolved your problem, please let us know! Thanks.
from generator-ionic.
Issue was fixed with Flow11's tip:
var spawn = require('win-spawn');
I develop on windows 7 PC and node.js version is v0.10.25.
Thank you for the quick reply!
Jerome
from generator-ionic.
Re-opening this for now. I used spawn
instead of exec
because I wanted to stream the output of the Cordova commands, but it would be a good idea rewrite this in a way that is more portable.
from generator-ionic.
Looks like the root cause of this issue is that the main cordova
command for Windows is a .cmd
file and since spawn
does not execute in a shell, only .exe
files would run.
Great gist - https://gist.github.com/domenic/2790533#non-portable-apis
Even the official npm
command has to incorporate some branching logic - https://github.com/npm/npm-www/blob/fd3a96e861989338676937736599598f7c0fde8f/dev/go.js#L22-27
I should have a fix for this shortly.
from generator-ionic.
I just got the exact same error even with the branch logic using the grunt build command. I'm using the win-spawn for now and it works
from generator-ionic.
@pgruenbacher are you still experiencing this issue on the latest version of generator-ionic
?
from generator-ionic.
@diegonetto just did a clean install, and grunt build returned no errors. looks good.
from generator-ionic.
Just an update, this issue still happens on Windows machines (Win7 for example) with all npm packages updated (including [email protected]).
Maybe a wiki page here could help new users. Thanks
from generator-ionic.
You can modify the spawn variable at the top of the Gruntfile to the follwing:
var spawn = process.platform === 'win32' ? require('win-spawn') : require('child_process').spawn;
This has a dependency on the win-spawn plugin which will need to be added to your package.json and installed.
from generator-ionic.
@djett41 That worked .. Thanks !
from generator-ionic.
Flow, Thank you very much. It worked for me.
from generator-ionic.
Related Issues (20)
- Workflow Post Development
- update_platform_config.js terminates when there is a browser platform HOT 4
- Is this project dead? HOT 6
- sudo npm install -g generator-ionic blow up HOT 13
- grunt run:android --livereload messes up with multiple networks HOT 1
- install cor dova in mac 10.10.5 HOT 2
- install cordova in mac 10.10.5 HOT 1
- grunt serve issue HOT 1
- I am installing [email protected] in my mac and I have added the camera plugin also. But I don't know how to configure xcode to Cordova and how to call xcode methods to html files. Note: Xcode version 7.2 Cordova version 6.0.0 Please help me! HOT 1
- Cordova camera plug in for ios HOT 1
- Resources not included
- Is "grunt emulate:ios --livereload" supposed to update the emulator image on changes?
- simple error in template tabs
- Yo ionic throws error HOT 1
- Request: Port to Angular 2.0 HOT 1
- Alternative: Generator-M-Ionic
- ionic upload lib folder problem
- grunt doesn't work HOT 2
- yo ionic unable to scaffold an Ionic Project! HOT 3
- ionic build android HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-ionic.