aurelia-contrib / aurelia-getting-started

Basically a queue of topics and examples to cover
MIT License
20 stars 5 forks source link

au new issue with node-gyp probably linux. a paragraph or 2 for core docs on cli #24

Open Alexander-Taran opened 6 years ago

Alexander-Taran commented 6 years ago

In some cases au new fails with installing dependencies probably because there is no prebuilt binary for one of the dependencies for specific version of nodejs if there is no python/gcc installed it fails silently via CLI

Got to add a note on that in docs

Dhanushka Dolapihilla @dhanushkad 16:15 Hello, looking for help. Just starting on aurelia, and "au new " seem to be hung at a "node-gyp rebuild" followed by "uws" install for a while now. Any idea why?

@dhanushkad are you on linux? or macos? might be you don't have python installed that is needed for node-gyp.. and that might be needed 'cause you are using node version for which there is no prebuilt binaries for one of the devDependencies. so npm tries to build it for you... node-sass is one of those to try to resolve don't agree to install dependencies when au new asks.. and then run npm -i in the project folder.. you will probably see the error clearly

maroy1986 commented 6 years ago

Good point for this. I've hit it a few times and I see a few of my colleagues get stumped by it. In our case using Windows, we need to install node-build-tools if I remember correctly, which install C++ dependency. In our case, this is a requirement of node-sass transpiler package.

This definitely needs to be documented so people can sort it out quickly. That being said, this issue isn't specific to Aurelia only.

Alexander-Taran commented 6 years ago

it is specific to users "living on the edge" no such problems for stable node versions 'cos there are binaries

maroy1986 commented 6 years ago

Nah, not specific to "living on the edge", can happen to anybody. I've seen people hitting this with various setup/nodejs versions.

maroy1986 commented 6 years ago

For example, here at my workplace, we hit this because we use a private NPM repo that doesn't seem to be able to "cache" binaries. So node-sass compile them itself each time we clear and rebuild the node_modules folder. Using npmjs.org repo straight shouldn't cause that issue though.