Hello-World-tutorial: yo blockstack error


I am trying to understand how authentication is working within blockstack and so I am trying to follow Hello-World tutorials and I got an error as below and I appreciate your support to solve:

yo blockstack
        throw err

    Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json.412770396'
        at Error (native)
        at Object.fs.openSync (fs.js:642:18)
        at Function.writeFileSync [as sync] (/usr/lib/node_modules/yo/node_modules/write-file-atomic/index.js:180:17)
        at Conf.set store [as store] (/usr/lib/node_modules/yo/node_modules/conf/index.js:142:19)
        at Conf.set (/usr/lib/node_modules/yo/node_modules/conf/index.js:64:14)
        at Insight.set optOut [as optOut] (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:56:15)
        at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:198:18)
        at Module._compile (module.js:577:32)
        at Object.Module._extensions..js (module.js:586:10)
        at Module.load (module.js:494:32)
1 Like


I am not sure this is the case, but I think you may need to use β€œsudo” (or whatever the equivalent would be for your operating system) with your commands, if npm is not installed globally.

It is possible if you installed npm just for this project, it was installed locally.

Can you try

$ npm list -g

to see if the associated modules are installed globally or locally?

-g indicates a global install.

You may be able to troubleshoot further based on this knowledge.

let me know how far this gets you.

I am using root user to avoid any permission obstacles as it is for testing .
I tried β€œnpm list -g” and the below is the head of the result:

β”œβ”€β”¬ [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ └── [email protected]
β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”œβ”€β”€ [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected]
β”‚ β”‚ β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”‚ └─┬ [email protected]
β”‚ β”‚ β”‚ └── [email protected]
β”‚ β”‚ β”œβ”€β”¬ [email protected]

I think yo forbids launching as root user. Try not being su, running it without any su or sudo, then try sudo if needed.

If these things do not work, try first checking what version of npm you have, and upgrading if needed, then running:

chmod g+rwx /root /root/.config /root/.config/configstore
chown root:root /root/.config/ -R

with the cmd edited for where you have your config file.

This was a fix for a now upgraded version of yo.

Regardless, I don’t think it supports running this as su.

Let me know where this gets you.

For who faced the same issue of permissions, It is solved by using normal user. The OS is Centos .
@ginxh I faced another issue if you can support. After Installation and run npm start I got the below error:
npm start

> [email protected] start /home/blockstack/hello-world-tutorial
> npm run browserify && node server.js

> [email protected] browserify /home/blockstack/hello-world-tutorial
> browserify requires.js -o public/bundle.js

server is listening on 5000
(node:7028) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Exited with code 3

Any one can solve this problem?
I have same problem on MacBook Pro
#npm create yo blockstack

Get bellow error

Error: EACCES: permission denied, open ..../.... insight-yo.json.1084501404

Please help!