The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

562829 (1) [Avatar] Offline
#1
I have just started Chapter 2 of this book and I am receiving the following error when attempting to run 'npm install' in the chapter-2 branch of the project directory:


npm WARN vue-hackernews-starter@1.0.0 No repository field.
npm WARN vue-hackernews-starter@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: assert-plus@1.0.0 (node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/home/vagrant/code/site3/node_modules/fsevents/node_modules/dashdash/node_modules/assert-plus/package.json.533113305'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: assert-plus@1.0.0 (node_modules/fsevents/node_modules/getpass/node_modules/assert-plus):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/home/vagrant/code/site3/node_modules/fsevents/node_modules/getpass/node_modules/assert-plus/package.json.3420617891'

npm ERR! path /home/vagrant/code/site3/node_modules/grpc/node_modules/verror/node_modules/assert-plus/package.json.4041296524
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/site3/node_modules/grpc/node_modules/verror/node_modules/assert-plus/package.json.4041296524'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent



I see that node modules have appeared to have installed, so I then attempt to run 'node build/dev-server.js', which produces this error:


ERROR Failed to compile with 2 errors 06:57:46

These dependencies were not found:

* firebase/app in ./src/api/api.js
* firebase/database in ./src/api/api.js

To install them, you can run: npm install --save firebase/app firebase/database
> Listening at http://localhost:8080

(node:29669) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess.cp.once.code (/home/vagrant/code/site3/node_modules/opn/index.js:82:13)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:557:12)
(node:29669) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:29669) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Attempting to install the missing dependencies it lists does not work, as the installation just hangs while producing the following message:

The authenticity of host 'github.com (192.30.253.112)' can't be established.bf0f
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
The authenticity of host 'github.com (192.30.253.112)' can't be established./ rollbackFailedOptional: verb npm-session c97322366e81bf0f
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

--------------------------------------------------------------------------------

Node Version: 8.11.2
NPM Version: 6.1.0
Operating System: Ubuntu 18.04 LTS
563922 (3) [Avatar] Offline
#2
Bumping firebase version to latest will fix this