I sign-in as admin and and use the command sudo npm install -g preact-cli@rc and there's an error. The install is on arch with the latest versions of node and npm. Other than that, are there are other react command line tools or frameworks that implement babel (etc) like that tool?
The error is:
Error: EACCES: permission denied, open '/usr/lib/node_modules/preact-cli/node_modules/nodent-runtime/dist/index.js'
at Object.openSync (fs.js:465:3)
at Object.writeFileSync (fs.js:1416:35)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/usr/lib/node_modules/preact-cli/node_modules/nodent-runtime/dist/index.js'
}
can you do sudo npm install -g preact-cli. As of yesterday we've hit stable with v3
The issue isn't different with that command.
You'll need to add the unsafe-perm flag.
sudo npm install -g --unsafe-perm preact-cli
Should work for you. Same as #802
Maybe worth adding instructions for?
Just to clarify - why would you need to install this as root? Doing so is _super_ dangerous - it's downloading megabytes of arbitrary code from the internet and executing it in a root shell.
Most helpful comment
Just to clarify - why would you need to install this as root? Doing so is _super_ dangerous - it's downloading megabytes of arbitrary code from the internet and executing it in a root shell.