ryanflorence / ember-tools

Generators and build tools for Ember applications
874 stars 82 forks source link

error when run command "ember build " #10

Closed zetahernandez closed 11 years ago

zetahernandez commented 11 years ago

I have this error when run command "ember build "

/usr/local/lib/node_modules/ember-tools/node_modules/jsdom/lib/jsdom.js:178 features = JSON.parse(JSON.stringify(window.document.implementation._fea ^ TypeError: Cannot read property 'implementation' of undefined at exports.env.exports.jsdom.env.processHTML (/usr/local/lib/node_modules/em ber-tools/node_modules/jsdom/lib/jsdom.js:178:59) at Object.exports.env.exports.jsdom.env (/usr/local/lib/node_modules/ember-t ools/node_modules/jsdom/lib/jsdom.js:269:5) at precompile (/usr/local/lib/node_modules/ember-tools/src/commands/precompi le.js:22:9) at module.exports (/usr/local/lib/node_modules/ember-tools/src/commands/prec ompile.js:9:5) at Walker. (/usr/local/lib/node_modules/ember-tools/src/commands/ precompile.js:54:5) at Walker.EventEmitter.emit (events.js:93:17) at Walker._wNext (/usr/local/lib/node_modules/ember-tools/node_modules/walk/ walk.js:212:8) at Walker._wNext (/usr/local/lib/node_modules/ember-tools/node_modules/walk/ walk.js:210:19) at Walker._wOnEmitDone (/usr/local/lib/node_modules/ember-tools/node_modules /walk/walk.js:109:8) at nextWhenReady (/usr/local/lib/node_modules/ember-tools/node_modules/walk/ node-type-emitter.js:69:29)

ryanflorence commented 11 years ago

closing until I get a response :radio:

slowthinker commented 11 years ago

I get the same error. Node v0.8.20 on Windows x64.

ryanflorence commented 11 years ago

I haven't tested any of this in windows, does jsdom work on windows?

Also sorry for closing earlier, I was on my phone thinking I was closing something else :frowning:

slowthinker commented 11 years ago

I've tracked it down to an issue with contextify (dependency of jsdom). jsdom does work on Windows, but apparently one hast to jump through some hoops to get it going. The easiest workaround for me right now is firing up a Linux VM. Thx.

zetahernandez commented 11 years ago

on windows you need install visual studio 2010 for compile contextify dependency

ryanflorence commented 11 years ago

@zetahernandez does installing visual studio 2010 fix your problem?

ryanflorence commented 11 years ago

Haven't heard back for a couple of weeks, please reopen if VS 2010 doesn't do the trick :pill:

miguelcobain commented 11 years ago

I can confim that "build" doesn't work on windows.

Can someone explain the problem?

ni5ni6 commented 11 years ago

I had the same error, than i think solved it by properly installing JSDom on Windows (folowing: http://www.steveworkman.com/node-js/2012/installing-jsdom-on-windows/), reinstalling npm, and ember-tools.

Than I get into another problem, but not sure if it's related or not:

$ ember build
   created:     js/templates.js
   created:     js/index.js

'c:\Users\nipe\AppData\Roaming\npm\node_modules\ember-tools\src\commands/../../n
ode_modules/browserbuild/bin/browserbuild' is not recognized as an internal or e
xternal command,
operable program or batch file.

c:\Users\nipe\AppData\Roaming\npm\node_modules\ember-tools\src\commands\build.js
:53
    if (error) throw new Error(error);
                     ^
Error: Error: Command failed: 'c:\Users\nipe\AppData\Roaming\npm\node_modules\em
ber-tools\src\commands/../../node_modules/browserbuild/bin/browserbuild' is not
recognized as an internal or external command,
operable program or batch file.

    at c:\Users\nipe\AppData\Roaming\npm\node_modules\ember-tools\src\commands\b
uild.js:53:22
    at ChildProcess.exithandler (child_process.js:606:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:700:16)
    at Socket.<anonymous> (child_process.js:913:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:436:12)
ryanflorence commented 11 years ago

I think there's a way to precompile templates now w/o having to make a dom, @wycats, am I mistaken?

billsimons commented 11 years ago

I get this error on Mac OSX 10.6.8 following the quickstart guide.

As others have reported, it seems that the contextify dependency wasn't satisfied when installing ember-tools.

consideRatio commented 11 years ago

Just like ni5ni6 commented, i have a simular problem:

C:\dev\proj\meow>ember build created: js/templates.js created: js/index.js created: js/application.js

'C:\Users\Erik\AppData\Roaming\npm\node_modules\ember-tools\src\commands/../../n ode_modules/browserbuild/bin/browserbuild' is not recognized as an internal or e xternal command, operable program or batch file.

C:\Users\Erik\AppData\Roaming\npm\node_modules\ember-tools\src\commands\build.js :55 if (error) throw new Error(error); ^ Error: Error: Command failed: 'C:\Users\Erik\AppData\Roaming\npm\node_modules\em ber-tools\src\commands/../../node_modules/browserbuild/bin/browserbuild' is not recognized as an internal or external command, operable program or batch file.

at C:\Users\Erik\AppData\Roaming\npm\node_modules\ember-tools\src\commands\b

uild.js:55:22 at ChildProcess.exithandler (child_process.js:609:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:703:16) at Process.ChildProcess._handle.onexit (child_process.js:770:5)

ghost commented 11 years ago

Hi, I'm getting the same error on OS X 10.8.3, when trying to precompile templates:

Command: ember precompile -d ~/Desktop/before -f ~/Desktop/after/index.js

Error:

/usr/local/lib/node_modules/ember-tools/node_modules/jsdom/lib/jsdom.js:178
    features   = JSON.parse(JSON.stringify(window.document.implementation._fea
                                                          ^
TypeError: Cannot read property 'implementation' of undefined
    at exports.env.exports.jsdom.env.processHTML (/usr/local/lib/node_modules/ember-tools/node_modules/jsdom/lib/jsdom.js:178:59)
    at Object.exports.env.exports.jsdom.env (/usr/local/lib/node_modules/ember-tools/node_modules/jsdom/lib/jsdom.js:269:5)
    at precompile (/usr/local/lib/node_modules/ember-tools/src/util/precompile.js:23:9)
    at module.exports (/usr/local/lib/node_modules/ember-tools/src/util/precompile.js:10:5)
    at Walker.<anonymous> (/usr/local/lib/node_modules/ember-tools/src/util/precompile.js:57:5)
    at Walker.EventEmitter.emit (events.js:93:17)
    at Walker._wNext (/usr/local/lib/node_modules/ember-tools/node_modules/walk/walk.js:212:8)
    at Walker._wNext (/usr/local/lib/node_modules/ember-tools/node_modules/walk/walk.js:210:19)
    at Walker._wOnEmitDone (/usr/local/lib/node_modules/ember-tools/node_modules/walk/walk.js:109:8)
    at nextWhenReady (/usr/local/lib/node_modules/ember-tools/node_modules/walk/node-type-emitter.js:69:29)

node v0.8.18 npm v1.2.2 Ember tools v0.1.1