Creating a new ember project works just fine: ember new foo
However, creating a new ember add-on fails due to permissions:
anijap@purpose:~/code$ ember addon bar
Error creating new application. Removing generated directory `./bar`
EACCES: permission denied, open '/usr/lib/node_modules/ember-cli/blueprints/addon/files/package.json'
Error: EACCES: permission denied, open '/usr/lib/node_modules/ember-cli/blueprints/addon/files/package.json'
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.writeFileSync (fs.js:1347:33)
at Class._writeFileSync (/usr/lib/node_modules/ember-cli/blueprints/addon/index.js:173:8)
at Class._writeContentsToFile (/usr/lib/node_modules/ember-cli/blueprints/addon/index.js:165:10)
at Class.generatePackageJson (/usr/lib/node_modules/ember-cli/blueprints/addon/index.js:63:10)
at Class.files (/usr/lib/node_modules/ember-cli/blueprints/addon/index.js:105:10)
at Class.install (/usr/lib/node_modules/ember-cli/lib/models/blueprint.js:430:43)
at _resolveBlueprint.then.blueprint (/usr/lib/node_modules/ember-cli/lib/tasks/install-blueprint.js:50:24)
at tryCatch (/usr/lib/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:539:12)
A quick fix seems to be running the add-on generation with sudo, but that doesn't seem right. Why would you need root privileges?
The file in question, /usr/lib/node_modules/ember-cli/blueprints/addon/files/package.json, doesn't exist.
Hi! I am closing this issue as this sounds like a problem with either an Ember CLI release, or with npm permissions in your system. Hopefully this has since been resolved.
Creating a new ember project works just fine:
ember new foo
However, creating a new ember add-on fails due to permissions:
The file in question,
/usr/lib/node_modules/ember-cli/blueprints/addon/files/package.json
, doesn't exist.A little bit of research yields #https://github.com/ember-cli/ember-cli/issues/2438. The issue fits perfectly, but there is no satisfactory answer; the StackOverflow answer doesn't seem applicable, I have nothing related to node in
/usr/local/lib
,/usr/local/include
or/usr/local/bin
.There is nothing unusual about my setup: latest version of debian and node.