Error Building Hello-Blockstack


#1

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!


#2

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


#3

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

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

> hello-blockstack@0.0.0 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! hello-blockstack@0.0.0 start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hello-blockstack@0.0.0 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 ↵

#4

@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


#5

No worries. Thanks for the help.

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

> fsevents@1.2.7 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 ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-errors@1.0.1 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.
+ webpack@4.29.6
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 ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.4.0 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.
+ webpack-cli@3.3.0
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.


#6

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…