Elvn
Elvn

Reputation: 3057

Ember.js install on Windows: Will not load app: Cannot find module 'ember-cli/lib/broccoli/ember-app'

Just installed ember.js on Windows machine (XP) - new to ember.js setting up dev machine.

Necessary components seem to be present and responsive.

$ember version gives me:

version: 0.2.3
node: 0.12.2
npm: 2.7.6

$npm version gives me:

{ alquimista: '0.0.0',
  npm: '2.7.4',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.2',
  openssl: '1.0.1m',
  uv: '1.4.2-node1',
  v8: '3.28.73',
  zlib: '1.2.8' }

Revision

$ bower list

app Y:\webwork\emberjs\alquimista\app

When I switch to my ember app directory and run

$ember server

I get an error

version: 0.2.3
Cannot find module 'ember-cli/lib/broccoli/ember-app'
Error: Cannot find module 'ember-cli/lib/broccoli/ember-app'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (Y:\webwork\emberjs\alquimista\Brocfile.js:3:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

Yes, I have confirmed "ember-cli/lib/broccoli/ember-app" exists and is in the PATH variable in a fully qualified form, c:/.. etc . But the error msg does not contain the fully qualified path so I wonder if ember.js is using a relative path on load? I don't know what base directory it would be starting from and referencing based on.

Does anyone have a suggested fix to get the ember server running on a Windows machine in a case like this?

Upvotes: 0

Views: 3498

Answers (3)

Elvn
Elvn

Reputation: 3057

Thanks for the suggestions, but the answer for a working Windows XP ember.js install is the following steps. I'm pretty sure it is a relative path issue problem with Windows and ember, but this seems to work around that issue:

// Setup node 1st

$node install
$node --version (to confirm good install)
// Note: Installs in system's Documents and Settings tree, weird, but okay

// IMPORTANT THING
//--> **Cd to the directory where you plan to create your application**

$npm -g install ember-cli
$ember -- version (to confirm good install)

// In the same directory, create the app tree with boilerplate code with this command
$ember new my-app-name

// Go have coffee, come back and enter the commands
$cd my-app-name
$ember server

Upvotes: 0

Christopher Milne
Christopher Milne

Reputation: 938

Did you run npm install ?

Also, you will need to run bower install to grab the front-end dependencies.

Upvotes: 0

herom
herom

Reputation: 2542

Seems related to this issue over at the ember-cli GitHub repository: https://github.com/ember-cli/ember-cli/issues/3961

As @ebryn states, npm install && bower install should help :)

In general, the setup should be as follows (on windows):

  • Install latest node.js
  • Install bower via npm install -g bower
  • Install phantomjs via npm install phantomjs
  • Install ember-cli via npm install [email protected]

and you should be good to go :)

Upvotes: 2

Related Questions