webark / ember-component-css

An Ember CLI addon which allows you to specify styles for individual components
MIT License
540 stars 115 forks source link

Can't run `ember` CLI commands in the addon on Windows #325

Open lolmaus opened 5 years ago

lolmaus commented 5 years ago
lolmaus@WALDECK MINGW64 /c/Code/ember-component-css (master)
$ ember help g unit-test
C:\Code\ember-component-css\node_modules\ember-cli\lib\models\project.js:708
        throw reason;
        ^

Error: EPERM: operation not permitted, stat 'C:\Code\ember-component-css\node_modules\no-style-files-yet'
    at Object.statSync (fs.js:851:3)
    at Object.statSync (C:\Code\ember-component-css\node_modules\graceful-fs\polyfills.js:295:24)
    at getRealFilePath (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\package-info-cache\index.js:38:19)
    at entries.forEach.entryName (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\package-info-cache\index.js:727:11)
    at Array.forEach (<anonymous>)
    at PackageInfoCache._readNodeModulesList (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\package-info-cache\index.js:715:13)
    at PackageInfoCache._readPackage (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\package-info-cache\index.js:644:30)
    at PackageInfoCache.loadProject (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\package-info-cache\index.js:251:24)
    at new Project (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\project.js:87:47)
    at Function.closestSync (C:\Code\ember-component-css\node_modules\ember-cli\lib\models\project.js:686:12)
lolmaus commented 5 years ago

Removing the readonly flag and resetting permissions does not help.

Happens even in a privileged terminal.

webark commented 5 years ago

https://github.com/ebryn/ember-component-css/blob/21c51206a394d07210ec4add6dd8797e4571497d/lib/pod-names.js#L56

maybe this is triggering it?

webark commented 5 years ago

and i don’t understand this path in the error

C:\Code\ember-component-css\node_modules\no-style-files-yet

webark commented 5 years ago

https://github.com/isaacs/node-graceful-fs/issues/158

webark commented 5 years ago

noo.. this is it i bet

https://github.com/ebryn/ember-component-css/blob/242af808baf4af80ea167c61fed9d8090b4397da/bin/install-test-addons.js#L4

webark commented 5 years ago

yea, i modeled that after https://github.com/ember-engines/ember-engines/blob/master/bin/install-test-addons.js, but should find a different way it looks like.

webark commented 5 years ago

you could try taking out https://github.com/ebryn/ember-component-css/blob/21c51206a394d07210ec4add6dd8797e4571497d/package.json#L19

and switching these from https://github.com/ebryn/ember-component-css/blob/21c51206a394d07210ec4add6dd8797e4571497d/package.json#L73 to like https://github.com/webark/ember-component-css/blob/1674225ac20638608047f8444deb8c3c998312f4/package.json#L67