felixrieseberg / ember-cli-windows-addon

:speedboat: Ember Addon, Optimizing Ember Cli Performance on Windows
MIT License
14 stars 5 forks source link

Doesn't work with npm@3.x #8

Closed JamesMGreene closed 8 years ago

JamesMGreene commented 8 years ago

In npm@3.x, the file structure of the node_modules directory was flattened. However, this addon does not currently take that into effect and appears to just blindly expect the ember-cli-windows tool to be at a very specific path.

As such, this Ember CLI addon does not currently work with npm@3.x:

> ember windows
version: 1.13.12
module.js:339
    throw err;
    ^

Error: Cannot find module 'C:\Users\gre63396\Development\win-ember\node_modules\
ember-cli-windows-addon\node_modules\ember-cli-windows\bin\ember-cli-windows'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3

[object Object]

That's because the ember-cli-windows module is now a sibling to the ember-cli-windows-addon module (directory-wise), e.g. running from the same directory as before:

> node_modules\.bin\ember-cli-windows
ember-cli-windows v2.0.0
Configure Windows for Ember-Cli Performace
If you continue, this tool will automate the configuration of Windows Defender a
nd Windows Search
Confirm: Do you want to proceed? (Y/N):  Y
Finished Search Configuration.
Finished Defender Configuration.
felixrieseberg commented 8 years ago

Dang, that's a really good point - and kind of embarrassing, given that I've been pushing npm@3 like crazy. I'll fix that.

JamesMGreene commented 8 years ago

Thanks, looking forward to it. :+1: