Simply type ember new app-name in the terminal and it always stalls on npm
The output:
installing app
create .bowerrc
create .editorconfig
create .ember-cli
create .jshintrc
create .travis.yml
create .watchmanconfig
create README.md
create app/app.js
create app/components/.gitkeep
create app/controllers/.gitkeep
create app/helpers/.gitkeep
create app/index.html
create app/models/.gitkeep
create app/resolver.js
create app/router.js
create app/routes/.gitkeep
create app/styles/app.css
create app/templates/application.hbs
create app/templates/components/.gitkeep
create bower.json
create config/environment.js
create ember-cli-build.js
create .gitignore
create package.json
create public/crossdomain.xml
create public/robots.txt
create testem.js
create tests/.jshintrc
create tests/helpers/destroy-app.js
create tests/helpers/module-for-acceptance.js
create tests/helpers/resolver.js
create tests/helpers/start-app.js
create tests/index.html
create tests/integration/.gitkeep
create tests/test-helper.js
create tests/unit/.gitkeep
create vendor/.gitkeep
Successfully initialized git.
â ‹ Installing packages for tooling via npm
And it just hangs there for longer than I could wait. Let me know if you need more info.
Output from ember version --verbose:
$ ember -v --verbose
ember-cli: 2.5.1
http_parser: 2.6.2
node: 5.7.0
v8: 4.6.85.31
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 47
openssl: 1.0.2f
os: darwin x64
Some additional info:
OS: OSX Yosemite 10.10.5 (14F1713)
$ npm -v
3.6.0
I also got the same problem running this:
ember install [email protected]
did you try to manually npm install? maybe npm is just being really slow for you.
npm is already installed:
$ npm -v
3.6.0
And it shouldn't be this slow right? (10+) minutes
try ember new app-name --skip-npm then go into the folder and run npm install there to see what's taking so long.
@mcshakes please be sure to provide ALL the information requested in https://github.com/ember-cli/ember-cli/blob/master/CONTRIBUTING.md (The yellow banner you saw when opening this issue)
It may take time, especially \w slow network or drive especially if something is watching the directory (like your editor, spotlight etc.etc.) and NPM itself isn't very quick.
did you try to manually npm install? maybe npm is just being really slow for you.
this won't make a difference, as ember new/install uses the npm we bundle with ember-cli.
@stefanpenner Added some more info to original post.
@Turbo87 Your suggestion seemed to work (skipping npm). Installing npm within the folder gave this output.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
First four took the longest and after that, it seemed to install just fine. I got the "Welcome to Ember" message when running ember serve. Anything else I should try/keep an eye out for?
Sounds like an npm thing... Tricky for us to dig into this without a reproduction.
@mcshakes can you still reproduce this behavior on your machine? If so, and since you're the only reporter of this, it could be a busted global ember-cli install. Can you remove your global ember-cli copy, clear your npm cache, reinstall, and then try again?
It's unfortunately very unlikely that we're going to be able to reproduce this on our own boxes which means you may be on your own for troubleshooting this. There's almost no amount of information you can provide that will make it possible for us to help you with this. 😕
Actually, in light of that, I'm going to close this issue. If you find a smoking gun _please feel encouraged to reopen this issue_ and we'll dive back in. Also, we're still notified of responses so closing this issue doesn't mean that we can't continue the conversation here; it just means that it's not something we're expecting to be able to address.
@nathanhammond No worries. Yes, I can still reproduce every time I ember new app-name. I'll try redoing a global ember-cli install and go from there. So far, skipping npm and running npm install within the folder fixes the problem. And, no issues while working on the app.
Thanks anyway. I'll update this issue for posterity if I find anything else after the global reinstall.
This is a really strange story, so I'm really hoping that it's just some weirdly broken npm install. Good luck, looking forward to hearing how the reinstall turns out!
I'm getting the same issue described here. 'ember new project-name' returns:
Could not find watchman; falling back to nodewatcher
Installing app
create (several things created)
Successfully initialized git.
.: Installing packages for tooling via npm
And that's where it sits for me. I just installed [email protected] and was working myself through the getting started page. System info:
ember-cli: 2.6.2
http_parser: 2.7.0
node: 6.2.1
v8: 5.0.71.52
uv: 1.9.1
zlib: 1.2.8
ares:1.10.1-DEV
icu: 56.1
modules: 48
openssl: 1.0.2h
os: linux arm
npm -v: 3.9.3
Working on a raspberry pi 3 remotely over a moderately slow 3G connection.
The hack described above (--skip-npm) also worked for me. I will use this work around for the time being.
@larryschirmer Can you try a full reinstall of node and an npm cache clear?
Ok, here is what I did:
_Once again, for debian jessie running on a raspberry pi 3_
1. Remove Directories
sudo rm -r /usr/local/lib/node_modules
sudo rm -r /usr/local/include/node
sudo rm -r /usr/local/bin _remove all of the modules here, I only had three but I suppose it's possible to have had more_
sudo rm -r /usr/lib/node_modules
2. Uninstall & Reinstall Node
sudo apt-get --purge remove nodejs
sudo apt-get install -y nodejs
3. Reinstall Ember.js
sudo npm install -g [email protected]
4. Make a New Project
_change into the proper directory_ /var/www/ember _for me_
sudo ember new ember-quickstart
I let it go for 21min before I control Ced it. Just an arbitrary amount of time. I just figured it should be enough time, right?
Then,
5. Try It with the Hack
sudo rm -r /var/www/ember/ember-quickstart
sudo ember new ember-quickstart --skip-npm
_Takes less than 10sec_
cd ember-quickstart
sudo npm install
The whole thing took about 21min, this time not arbitrary. It was just easier to let it go when there was a progress bar to look back at.
So, do some math, maybe it just takes 22min for it to make a new project on a raspberry pi 3?
Turns out…
Nah, after 40min this time I gave up. It's much faster to use the hack. How long do normal people have to wait for a new ember project to be made?
@larryschirmer Thank you for taking the time to review and explain your steps. Your attention to detail makes it possible for me to dive in and help.
One of the things that we're careful about is to _not_ install anything using sudo. node and npm should be run at user-level permissions, as should ember. I imagine that it's hanging because ember uses its own bundled npm which is being locked out from accessing the files it needs on the system because some of them are set to the wrong permissions. I can't confirm that but you should be able to test it.
Modifications to your script from above:
sudo rm -r /usr/lib/node_modules
+ npm cache clear
- sudo npm install -g [email protected]
+ npm install -g [email protected]
- sudo ember new ember-quickstart
+ ember new ember-quickstart
I suspect that is your underlying issue. If you can spare ~25 minutes to try it all again let me know how it turns out.
I appreciate your helping me with this. I see that my newness to Linux is showing. I had thought that pi@raspberry with sudo = root user (in terms of privileges), but now it makes sense to me that these are different things. I adapted my scripts, taking out sudo and actually switching to root user. I still had similar behavior. I tried it twice each for a half hour, double checking things before starting again. No luck, still just hangs. I will keep in mind your recommendations.
I have in mind the setup I have to be an environment for learning new platforms and making mistakes. When I reimage my system, I'll be sure to limit my use of sudo and do everything as root user.
Is it normal for new ember sites to take 20min to make and am I asking a lot of my RPi3 to do this for me?
The trick is that you actually want to run node and npm as a normal user, not a superuser (either as root or sudo). You don't need that level of privileges in order to run node. In almost all cases you don't want to be a superuser.
As to the time of install that's simply because of the performance of the Raspberry Pi combined with npm being terribly resource intensive. That's not an Ember CLI problem per se, instead a problem with npm which we defer to for managing our packages.
@nathanhammond I originally thought I _needed_ sudo or root access because npm would always give me an EACCES error. A little casual sudo always did the trick. I just thought that was what everyone did.
Your last comment really got me thinking, there must be something wrong with my permissions. Good thing there is a great article on npm's website called Fixing npm permissions, so I followed it word for word.
$ npm config get prefix
/usr
$ mkdir ~/.npm-global
$ npm config set prefix '~/.npm-global'
$ sudo nano ~/.profile
I added export PATH=~/.npm-global/bin:$PATH to the end of the document
$ source ~/.profile
Then, I tested it without the sudo per the article's recommendation
$ npm install -g jshint
and it worked!
Then when I went to uninstall ember-cli and start fresh, I realized that I changed the reference directory and made the old improperly permissioned ember-cli module inaccessible. So I guess there is no need to uninstall it. I will just need to remember to delete it later.
So I installed ember again
$ npm install -g [email protected]
And then tried to build a project
$ cd /var/www/ember
$ ember new ember-quickstart
EACCES: permission denied, mkdir 'ember-quickstart'
This started me down a crash coarse on file permissions which ended me at wired.com of all places. Basically, I understand that 'pi' has ownership of the Home directory and everywhere else it has to ask permission, or in this case be granted permission.
$ sudo chown pi /var/www/ember
$ ls -ld
drwxr-xr-x 2 pi root 4096 Jul 8 03:47
$ ember new ember-quickstart
I wrote all this while terminal was .: Installing packages for tooling via npming, hoping I would have a success story. I give it an hour. In hindsight, I did realize that I forgot to clear npm's cache before I started so maybe I could do that later?
I recommend getting the permissions correct and then starting over from scratch with no sudo the entire way. I'm not sure about the default permissions model on a Pi linux install, but this looks incorrect:
drwxr-xr-x 2 pi root
The output should probably match this:
cd ~
ls -ld
Hey,
Also getting this.
Just updated Windows 8.1 -> Windows 10.
Everything worked for me in 8.1
Now also getting Installing packages for tooling via npm.
What else would you like me to submit?
I thought i had the same error, but then after reading all the comments. Its over now. wait for little longer guys
Is this resolved? I'm getting the same error in slackware linux 14.1
wifislax atorralb # ng new creamm
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
installing ng2
create README.md
create src/app/app.component.css
create src/app/app.component.html
create src/app/app.component.spec.ts
create src/app/app.component.ts
create src/app/app.module.ts
create src/app/index.ts
create src/app/shared/index.ts
create src/environments/environment.prod.ts
create src/environments/environment.ts
create src/favicon.ico
create src/index.html
create src/main.ts
create src/polyfills.ts
create src/styles.css
create src/test.ts
create src/tsconfig.json
create src/typings.d.ts
create angular-cli.json
create e2e/app.e2e-spec.ts
create e2e/app.po.ts
create e2e/tsconfig.json
create .gitignore
create karma.conf.js
create package.json
create protractor.conf.js
create tslint.json
Successfully initialized git.
Installing packages for tooling via npm.
node version : v6.6.0
@atorralb You are at the wrong CLI. You're looking for this one: https://github.com/angular/angular-cli
@nathanhammond oops my bad... sorry for that
why it doesn't show the progress, even with -v ?
have the same issue
node 7.4
angular cli 1.0.0.25
@michaelrodov please use the angular-cli bug tracker for reports like this.
It just takes a very long time to install all libraries in the node_modules directory. Be patient and you will be rewarded: "Installed packages for tooling via npm. Project 'xxx' successfully created." ;)
Most helpful comment
try
ember new app-name --skip-npmthen go into the folder and runnpm installthere to see what's taking so long.