Error Building Hello-Blockstack

I’m on my MacBook and have been following the Android Tutorial. My problem is that I’m running into an issue when I get to the Build the Blockstack hello-world section.

At step #4 it says I should receive a prompt similar to:

[fsevents] Success:
"/Users/theuser/repos/hello-blockstack/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"
is installed via remote npm notice created a lockfile as package-lock.json.
You should commit this file. added 1060 packages in 26.901s

But I actually get something like this:

4 warnings generated.
SOLINK_MODULE(target) Release/secp256k1.node
npm notice created a lockfile as package-lock.json. You should commit this file.
added 955 packages from 745 contributors and audited 9938 packages in 15.385s
found 3 vulnerabilities (2 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details

I’ve tried to move on to step #5, where it says to run $ npm start, but I can’t even do that. It seems I’m running into some kind of issue at step #4. I don’t know what it is exactly or how to fix it. I’ve tried to run npm audit fix but that doesn’t seem to do anything.

Thanks in advance for any help!

What is the output when you try to run npm start?

1 Like

Here’s what’s returned when I try to run npm start:

[MacBook-Pro-27 :: ~/development/hello-blockstack-react % npm start        127 ↵

> [email protected] start /Users/chris/Development/hello-blockstack-react
> webpack-dev-server

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Emitted 'error' event at:
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1468:12)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/chris/.npm/_logs/2019-04-06T02_02_18_543Z-debug.log
MacBook-Pro-27 :: ~/development/hello-blockstack-react %                    1 ↵

@CBobRobison Sorry you are having problems. I was able to recreate your problem…but not sure my workaround will work for you. Try this.

  1. Delete the hello-blockstack directory you created.

  2. Follow these procedures to install webpack

    ```
    npm install webpack --save-dev
    npm install webpack-cli --save-dev
    
    
    
  3. Then go ahead and do this again: https://docs.blockstack.org/android/tutorial.html#generate-and-launch-your-hello-blockstack-application

1 Like

No worries. Thanks for the help.

I deleted the dir and tried to install both in step 2 and returned the following:

> [email protected] install /Users/chris/node_modules/fsevents
> node install
node-pre-gyp WARN Using request for node-pre-gyp https download 
[fsevents] Success: "/Users/chris/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote
npm WARN saveError ENOENT: no such file or directory, open '/Users/chris/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/chris/package.json'
npm WARN [email protected] requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN chris No description
npm WARN chris No repository field.
npm WARN chris No README data
npm WARN chris No license field.
+ [email protected]
added 382 packages from 210 contributors and audited 6225 packages in 11.341s
found 2 moderate severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details

and:

npm WARN saveError ENOENT: no such file or directory, open '/Users/chris/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/chris/package.json'
npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN chris No description
npm WARN chris No repository field.
npm WARN chris No README data
npm WARN chris No license field.
+ [email protected]
added 66 packages from 28 contributors and audited 19086 packages in 10.158s
found 2 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

I tried to then run npm audit fix but that didn’t work either.

Can you paste your debug log here so we can see what’s going on? I suspect you are going to have to resolve some dependencies…