create-graphql
create-graphql copied to clipboard
permit local installations
hi,
i'm trying to locally install create-graphql via yarn but i receive this error:
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "generator-graphql"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
it would be nice to avoid every reference to global packages in order to install create-graphql globally o locally.
could you tried to use NVM or something like it? it makes installing global packages without need for root access
you just have to use the existing dependencies system of npm modules instead of running arbitrary commands on the host machine to install required deps. please move generator-graphql as dep or peerDep and fix this.
@phra: our current structure runs this way because we have a CLI tool that abstracts the use of Yeoman.
We are going to improve that on our next major version that is focused on supporting plugins and parsing ASTs the same way that Babel does.