Git Product home page Git Product logo

letters-social's Introduction

Master: CircleCI

Welcome!

If you're here, you're probably reading React in Action by, well, me ( @markthethomas) πŸ˜€! I hope you're enjoying learning about React so far. If you have any questions or thoughts, feel free to reach out to me @markthethomas ( blog, twitter, github) pretty much anywhere. Below are some helpful links to chapters, documentation, the running application, and so on.

Links

  • Buy: Buy React in Action and get started today!
  • App: Example application that you'll build in React in Action.
  • Docs: Documentation for the application source code generated using ESDoc. It's not perfect, but you can use it to get a quick overview of the sample application.
  • Guide to the React Ecosystem: As part of React in Action, I've put together a guide to the React ecosystem. The goal of the guide is to help you get your feet when navigating the many different communities, online and otherwise, that comprise the React ecosystem.
  • Forum: The book forum is a great place to ask questions about the book
  • Site: I try to write often at my personal blog, If Else. Check it out if you're interested in React, JavaScript, UI engineering, or random programming tidbits!
  • Twitter: Have a question about the book? Feel free to tweet at me or DM me and I'll get back to you!
  • Email: You can also feel free to send me an email and I'll do my absolute best to get back to you
  • Issues: Feel free to open any issues w/ questions or proposed changes here

Chapter branches

Tooling

What you'll build

Letters Social, a social networking app that leverages React, Redux, and even gets you using more interesting techniques like server-side rendering!

React in Action by Mark Thomas

letters-social's People

Contributors

greenkeeperio-bot avatar markthethomas avatar nguyen190887 avatar prusswan avatar shelbyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

letters-social's Issues

Node 10 support.

npm install fails with node 10.13.0 on macOS 10.14.1.

$ npm install

> [email protected] install /Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents
> node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:../../nan/nan_maybe_43_inl.h112::11215::15 : error: error: no member nonamed  member'ForceSet'  namedin  'ForceSet''v8::Object' in
 'v8::Object'
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);

         ~~~  ^         ~~~  ^

In file included from In file included from ../fsevents.cc../fsevents.cc::66:
:
In file included from In file included from ../../nan/nan.h../../nan/nan.h::198198:
:
In file included from In file included from ../../nan/nan_new.h:../../nan/nan_new.h189::
189:
../../nan/nan_implementation_12_inl.h:../../nan/nan_implementation_12_inl.h337::33728::28 : warning: warning: 'New' 'New'is  isdeprecated  deprecated[-Wdeprecated-declarations] [-Wdeprecated-declarations]

  return v8::StringObject::New(value).As<v8::StringObject>();  return v8::StringObject::New(value).As<v8::StringObject>();

                           ^                           ^

/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8.h:/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8.h5052::50523::3 : note: note: 'New' 'New'has  hasbeen  beenexplicitly  explicitlymarked  markeddeprecated  deprecatedhere here

  V8_DEPRECATED("Use Isolate* version",
  V8_DEPRECATED("Use Isolate* version",
  ^
  ^
/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8config.h:327:29: note: expanded /Users/mariogrgic/.node-gyp/10.13.0/include/node/v8config.hfrom: 327macro: 29'V8_DEPRECATED': 
note: expanded from macro   declarator __attribute__((deprecated))'V8_DEPRECATED'

                            ^
  declarator __attribute__((deprecated))
                            ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:834:18:In file included from  ../fsevents.cc:warning6: :
../../nan/nan.h'MakeCallback': 834is: 18:deprecated:  Use warningMakeCallback(...,:  async_context)
'MakeCallback'       [-Wdeprecated-declarations]is 
deprecated: Use MakeCallback(..., async_context)
      [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
    return node::MakeCallback(
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:                 ^175
:1: /Users/mariogrgic/.node-gyp/10.13.0/include/node/node.hnote:: 175:'MakeCallback'1 :has  been noteexplicitly:  marked'MakeCallback'
       hasdeprecated  beenhere explicitly
 marked
      deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:^91:
20: /Users/mariogrgic/.node-gyp/10.13.0/include/node/node.hnote:: 91:expanded20 :from  macro note'NODE_DEPRECATED': 
expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../fsevents.cc:6:
../../nan/nan.hIn file included from :../fsevents.cc849::618:
: ../../nan/nan.h:849warning:: 18: 'MakeCallback' iswarning : deprecated: Use'MakeCallback'  MakeCallback(...,is  async_context)deprecated:
       Use[-Wdeprecated-declarations] MakeCallback(...,
 async_context)
      [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
    return node::MakeCallback(
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h                 ^:
168:1: /Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:168note:: 1:'MakeCallback'  has notebeen:  explicitly'MakeCallback'  markedhas
       beendeprecated  explicitlyhere marked

      deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h^:
91:20: /Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:91note:: 20:expanded  from notemacro:  'NODE_DEPRECATED'expanded 
from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h../fsevents.cc::8646::
18:../../nan/nan.h :864:warning18: : 'MakeCallback' warningis:  deprecated: 'MakeCallback'Use  isMakeCallback(...,  deprecated:async_context) 
Use       [-Wdeprecated-declarations]MakeCallback(..., 
async_context)
      [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
    return node::MakeCallback(
                 ^/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h
:161:1:/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h :161:note1: : 'MakeCallback' hasnote : been 'MakeCallback'explicitly  hasmarked 
been       deprecatedexplicitly  heremarked

      deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:91:20/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:: 91:20note::  expanded notefrom:  macroexpanded  'NODE_DEPRECATED'from 
macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:911:44: In file included from ../fsevents.cc:warning6: :
../../nan/nan.h'ToString': 911is: 44deprecated:  [-Wdeprecated-declarations]
warning: 'ToString' is deprecated [-Wdeprecated-declarations]
      v8::Local<v8::String> string = from->ToString();
                                           ^
/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8.h:      v8::Local<v8::String> string = from->ToString();2454
:10                                           ^:
 note: 'ToString'/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8.h :has2454 :been10 :explicitly  marked notedeprecated: 
      'ToString'here has
 been explicitly marked deprecated
      here
  inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
         ^
/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8config.h:  inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);327
:29         ^:
 note: /Users/mariogrgic/.node-gyp/10.13.0/include/node/v8config.hexpanded: 327from: 29macro:  'V8_DEPRECATED'
note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
  declarator __attribute__((deprecated))
                            ^
In file included from In file included from ../fsevents.cc../fsevents.cc::66:
:
../../nan/nan.h../../nan/nan.h::921921::2727::  warningwarning: : 'WriteUtf8''WriteUtf8'  isis  deprecateddeprecated  [-Wdeprecated-declarations][-Wdeprecated-declarations]

        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);

                          ^                          ^

/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8.h/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8.h::26582658::33::  notenote: : 'WriteUtf8''WriteUtf8'  hashas  beenbeen  explicitlyexplicitly  markedmarked  deprecateddeprecated

            herehere

  V8_DEPRECATED("Use Isolate* version",  V8_DEPRECATED("Use Isolate* version",

  ^  ^

/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8config.h/Users/mariogrgic/.node-gyp/10.13.0/include/node/v8config.h::327327::2929::  notenote: : expandedexpanded  fromfrom  macromacro  'V8_DEPRECATED''V8_DEPRECATED'

  declarator __attribute__((deprecated))  declarator __attribute__((deprecated))

                            ^                            ^

In file included from ../fsevents.cc:6:
In file included from ../fsevents.cc../../nan/nan.h::61473:
:31:../../nan/nan.h :1473:warning31: : 'MakeCallback' warningis:  deprecated: 'MakeCallback'Use  isMakeCallback(...,  deprecated:async_context) 
Use       [-Wdeprecated-declarations]MakeCallback(..., 
async_context)
      [-Wdeprecated-declarations]
    return scope.Escape(node::MakeCallback(
                              ^
    return scope.Escape(node::MakeCallback(
                              ^
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:175:/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h1::175 :1:note : 'MakeCallback'note : has 'MakeCallback'been  hasexplicitly  beenmarked 
explicitly       deprecatedmarked 
here      deprecated
 here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
NODE_DEPRECATED("Use MakeCallback(..., async_context)",^

^
/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h:/Users/mariogrgic/.node-gyp/10.13.0/include/node/node.h91::9120::20 : note: note: expanded expandedfrom  frommacro  macro'NODE_DEPRECATED' 'NODE_DEPRECATED'

    __attribute__((deprecated(message))) declarator
    __attribute__((deprecated(message))) declarator
                   ^
                   ^
7 warnings and 1 error generated.
7 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1make: 
*** [Release/obj.target/fse/fsevents.o] Error 1
gypgyp  ERR! build error 
ERR! build error 
gyp ERR! gypstack Error: `make` failed with exit code: 2
 gypERR!  ERR! stackstack Error: `make` failed with exit code: 2
     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gypgyp  ERR!ERR!  stackstack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
     at ChildProcess.emit (events.js:182:13)
gypgyp  ERR!ERR!  stackstack     at ChildProcess.emit (events.js:182:13)
     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! gypSystem Darwin 18.2.0
 ERR! System Darwin 18.2.0
gyp ERR! gypcommand  "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
ERR! gypcommand  "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
ERR! gypcwd  /Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents
ERR!gyp  cwdERR! /Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents
 node -vgyp  v10.13.0
ERR!gyp  node -v v10.13.0
ERR! node-gyp -vgyp v3.8.0
 ERR! gypnode-gyp -v  v3.8.0
ERR! gypnot ok ERR! not ok 
 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents
node-pre-gyp ERR! node -v v10.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)

> [email protected] install /Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-darwin-x64-unknown.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-darwin-x64-unknown.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
 ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc
node-pre-gyp ERR! node -v v10.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.onstall script
  CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.ocript
In file included from ../deps/grpc/src/core/lib/channel/channel_stack_builder.c:19:nstall script
In file included from ../deps/grpc/src/core/lib/channel/channel_stack_builder.h:24:
../deps/grpc/src/core/lib/channel/channel_args.h:22:10: fatal error: 'grpc/compression.h' file not found
#include <grpc/compression.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/mariogrgic/Development/Node-js/letters-social/node_modules/grpc
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install 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/mariogrgic/.npm/_logs/2018-11-04T15_14_15_133Z-debug.log
$ 

npm install at branch: chapter-4 failed !!!

Hi,

As mentioned in the title I cannot end up cleanly with npm install !
I have clone your repository, then cd into it.
Then type: git branch chapter-4 and finally:
npm istall

The last command end with an issue and I cannot study your book.
I am with node version: 10.9.0
I am on Mac OSX: 10.13.6

Here is the output:
======8< ------------------- >8 ====================
npm install

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/chokidar/node_modules/fsevents
node install

[fsevents] Success: "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
gypgyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gypgyp WARN downloadWARN NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gypgyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from In file included from ../fsevents.cc../fsevents.cc::66:
:
In file included from In file included from ../../nan/nan.h../../nan/nan.h::192192:
:
../../nan/nan_maybe_43_inl.h:112../../nan/nan_maybe_43_inl.h::15112:: 15: errorerror: : nono membermember namednamed 'ForceSet''ForceSet' in 'v8::Object'in
'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
~~~ ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:834:18In file included from : ../fsevents.cc:6warning:
: ../../nan/nan.h:'MakeCallback'834 :is18 :deprecated: Use warningMakeCallback(...,: async_context) [-Wdeprecated-declarations]'MakeCallback'
is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
return node::MakeCallback(
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:/Users/mic/.node-gyp/10.9.0/include/node/node.h171::1711::1 : note: note: 'MakeCallback' 'MakeCallback'has hasbeen beenexplicitly explicitlymarked markeddeprecated heredeprecated
here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: note: ^expanded from macro 'NODE_DEPRECATED'

/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: attribute((deprecated(message))) declarator
note ^:
expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:849:18: In file included from ../fsevents.cc:warning6: :
../../nan/nan.h'MakeCallback': 849is: 18deprecated:: Use MakeCallback(...,warning : async_context) [-Wdeprecated-declarations]'MakeCallback'
is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] return node::MakeCallback(

             ^

/Users/mic/.node-gyp/10.9.0/include/node/node.h: return node::MakeCallback(164
:1: ^
note: 'MakeCallback'/Users/mic/.node-gyp/10.9.0/include/node/node.h :has164 :been1 :explicitly marked notedeprecated: here'MakeCallback'
has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88NODE_DEPRECATED("Use MakeCallback(..., async_context)",:
20:^
note: expanded from/Users/mic/.node-gyp/10.9.0/include/node/node.h:88 :20macro: 'NODE_DEPRECATED'
note: expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
attribute((deprecated(message))) declarator
^
In file included from In file included from ../fsevents.cc../fsevents.cc::66:
:
../../nan/nan.h../../nan/nan.h::864864::1818:: warningwarning: : 'MakeCallback''MakeCallback' isis deprecated:deprecated: UseUse MakeCallback(...,MakeCallback(..., async_context)async_context) [-Wdeprecated-declarations][-Wdeprecated-declarations]

return node::MakeCallback(
return node::MakeCallback(                 ^

             ^

/Users/mic/.node-gyp/10.9.0/include/node/node.h:157:1: /Users/mic/.node-gyp/10.9.0/include/node/node.h:note: 157:'MakeCallback'1 has: been explicitly note: marked 'MakeCallback'deprecated hashere been
explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:NODE_DEPRECATED("Use MakeCallback(..., async_context)",20
: ^
note: expanded from /Users/mic/.node-gyp/10.9.0/include/node/node.hmacro: 88'NODE_DEPRECATED':20
: note: expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
attribute((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
In file included from ../fsevents.cc:6:
attribute((deprecated(message))) declarator
../../nan/nan.h ^:
1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
4 warnings and 1 error generated.
4 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gypgyp ERR! commandERR! "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
build errorgyp
ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gypgyp ERR!ERR! stack Error: make failed with exit code: 2
not okgyp
ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/google-gax/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
[grpc] Success: "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" is installed via remote

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
gypgyp WARNWARN downloaddownload NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp gypWARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw': No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oexec install script
make: *** No rule to make target Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o', needed by Release/libgrpc.a'. Stop.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/chokidar/node_modules/fsevents
node install

[fsevents] Success: "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
gypgyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gypgyp WARN downloadWARN NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gypgyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from In file included from ../fsevents.cc../fsevents.cc::66:
:
In file included from In file included from ../../nan/nan.h../../nan/nan.h::192192:
:
../../nan/nan_maybe_43_inl.h:112../../nan/nan_maybe_43_inl.h::15112:: 15: errorerror: : nono membermember namednamed 'ForceSet''ForceSet' in 'v8::Object'in
'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
~~~ ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:834:18In file included from : ../fsevents.cc:6warning:
: ../../nan/nan.h:'MakeCallback'834 :is18 :deprecated: Use warningMakeCallback(...,: async_context) [-Wdeprecated-declarations]'MakeCallback'
is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
return node::MakeCallback(
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:/Users/mic/.node-gyp/10.9.0/include/node/node.h171::1711::1 : note: note: 'MakeCallback' 'MakeCallback'has hasbeen beenexplicitly explicitlymarked markeddeprecated heredeprecated
here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: note: ^expanded from macro 'NODE_DEPRECATED'

/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: attribute((deprecated(message))) declarator
note ^:
expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:849:18: In file included from ../fsevents.cc:warning6: :
../../nan/nan.h'MakeCallback': 849is: 18deprecated:: Use MakeCallback(...,warning : async_context) [-Wdeprecated-declarations]'MakeCallback'
is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] return node::MakeCallback(

             ^

/Users/mic/.node-gyp/10.9.0/include/node/node.h: return node::MakeCallback(164
:1: ^
note: 'MakeCallback'/Users/mic/.node-gyp/10.9.0/include/node/node.h :has164 :been1 :explicitly marked notedeprecated: here'MakeCallback'
has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88NODE_DEPRECATED("Use MakeCallback(..., async_context)",:
20:^
note: expanded from/Users/mic/.node-gyp/10.9.0/include/node/node.h:88 :20macro: 'NODE_DEPRECATED'
note: expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
attribute((deprecated(message))) declarator
^
In file included from In file included from ../fsevents.cc../fsevents.cc::66:
:
../../nan/nan.h../../nan/nan.h::864864::1818:: warningwarning: : 'MakeCallback''MakeCallback' isis deprecated:deprecated: UseUse MakeCallback(...,MakeCallback(..., async_context)async_context) [-Wdeprecated-declarations][-Wdeprecated-declarations]

return node::MakeCallback(
return node::MakeCallback(                 ^

             ^

/Users/mic/.node-gyp/10.9.0/include/node/node.h:157:1: /Users/mic/.node-gyp/10.9.0/include/node/node.h:note: 157:'MakeCallback'1 has: been explicitly note: marked 'MakeCallback'deprecated hashere been
explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:NODE_DEPRECATED("Use MakeCallback(..., async_context)",20
: ^
note: expanded from /Users/mic/.node-gyp/10.9.0/include/node/node.hmacro: 88'NODE_DEPRECATED':20
: note: expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
attribute((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
In file included from ../fsevents.cc:6:
attribute((deprecated(message))) declarator
../../nan/nan.h ^:
1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/mic/.node-gyp/10.9.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^
4 warnings and 1 error generated.
4 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gypgyp ERR! commandERR! "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
build errorgyp
ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gypgyp ERR!ERR! stack Error: make failed with exit code: 2
not okgyp
ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/google-gax/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
[grpc] Success: "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" is installed via remote

[email protected] install /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
gypgyp WARNWARN downloaddownload NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp gypWARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw': No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oexec install script
make: *** No rule to make target Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o', needed by Release/libgrpc.a'. Stop.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/mic/WebstormProjects/React_In_Action/letters-social/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

=========8< ------------------------------------------ >8 ====================

Thank for the quick reply, i am stuck !
Rgds,

How does the endpoint request in ch4: app.js work?

Hi @markthethomas

I'm curious about the endpoint http request in chapter 4:

endpoint: `${process.env
                .ENDPOINT}/posts?_page=1&_sort=date&_order=DESC&_embed=comments&_expand=user&_embed=likes`,

I don't understand how the results get paginated. I understand it has something to do with _page=#, but I don't see this in any specifications and furthermore, I don't understand how it knows to bring provide only 10 items. Could you please clarify?

Thanks!

After clone a project can't get image source.

Hi everyone.

I cloned a project to my local machine and change branch to chapter-4. Install dependencies and after all of this I run npm run dev and get image error which says net::ERR_BLOCKED_BY_CLIENT (Image not found )

I don't change anything I just load project and install dependencies .
Here the sample of image component which show an image

<Ad url="https://ifelse.io/book" imageUrl="/static/assets/ads/ria.png" />
Ad component only show's ads by Letters
Any idea?

Thanks in advance.

Running `npm run dev` doesn't work

Running the above command results in an error:

ERROR in ./src/index.js Module build failed: Error: Using babel-preset-react-apprequires that you specifyNODE_ENVorBABEL_ENV environment variables. Valid values are "development", "test", and "production". Instead, received: undefined. (While processing preset: "P:\\react-in-aciton\\letters-social\\node_modules\\babel-preset-react-app\\index.js") at Object.<anonymous> (P:\react-in-aciton\letters-social\node_modules\babel-preset-react-app\index.js:47:9) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\options\option-manager.js:296:17 at Array.map (<anonymous>) at OptionManager.resolvePresets (P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20) at OptionManager.mergePresets (P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10) at OptionManager.mergeOptions (P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\options\option-manager.js:249:14) at OptionManager.init (P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12) at File.initOptions (P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\index.js:212:65) at new File (P:\react-in-aciton\letters-social\node_modules\babel-core\lib\transformation\file\index.js:135:24) @ multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server ./src/index

SyntaxError: Unexpected token import

Chapter 7

node -v
v8.9.4
npm -v
5.6.0

NODE_ENV=development BABEL_ENV=development npm test
 FAIL  test/components/nav/navbar.test.js
  ● Test suite failed to run

    /home/ezh/nuclide-test/letters-social/test/setup.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){/* istanbul ignore next */var cov_2qwcktmx8o = function () {var path = '/home/ezh/nuclide-test/letters-social/test/setup.js',hash = '13d40d1b49cdf23a9ac6062fa17877855d14e3ad',global = new Function('return this')(),gcv = '__coverage__',coverageData = { path: '/home/ezh/nuclide-test/letters-social/test/setup.js', statementMap: { '0': { start: { line: 4, column: 0 }, end: { line: 4, column: 45 } }, '1': { start: { line: 6, column: 0 }, end: { line: 9, column: 2 } }, '2': { start: { line: 12, column: 0 }, end: { line: 32, column: 2 } }, '3': { start: { line: 16, column: 12 }, end: { line: 19, column: 14 } }, '4': { start: { line: 26, column: 8 }, end: { line: 30, column: 10 } } }, fnMap: { '0': { name: '(anonymous_0)', decl: { start: { line: 15, column: 21 }, end: { line: 15, column: 22 } }, loc: { start: { line: 15, column: 27 }, end: { line: 20, column: 9 } }, line: 15

    SyntaxError: Unexpected token import

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:305:17)
      at handle (node_modules/worker-farm/lib/child/index.js:44:8)
      at process.<anonymous> (node_modules/worker-farm/lib/child/index.js:51:3)
      at emitTwo (events.js:126:13)

and so on... All tests are failed.
Solution - jestjs/jest#2081 (comment)
We need to add one more plugin to .babelrc transform-es2015-modules-commonjs

After that all tests are passed as expected.

Something went wrong

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Error on npm install

Hi,
I got an error while installing modules, How can fix this ?
Thanks.

[email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Fix only on master branch, not in other branch involved

The map error still not fixed on chapter-4.

ERROR in ./src/components/post/Post.js
Module not found: Error: Can't resolve '../map/DisplayMap' in '/home/pm/Books/ReactInAction/letters-social/src/components/post'
@ ./src/components/post/Post.js 43:18-46
@ ./src/app.js
@ ./src/index.js

Please fix the error not only on master branch,...

[nodemon] app crashed - waiting for file changes before starting

After comand npm run dev i have error [nodemon] app crashed - waiting for file changes before starting
http://prntscr.com/lk68wd
http://prntscr.com/lk69dt
How me fix it all and run our education project?
D:\letters-social-chapter-4>npm run dev

[email protected] dev D:\letters-social-chapter-4
cross-env NODE_ENV=development npm-run-all -p api client:dev server:dev styles:w

[email protected] client:dev D:\letters-social-chapter-4
webpack-dev-server --config ./build/webpack.config.js

[email protected] api D:\letters-social-chapter-4
nodemon -x node -r @std/esm ./db/run.js

[email protected] server:dev D:\letters-social-chapter-4
nodemon --config nodemon.json index.js

[email protected] styles:w D:\letters-social-chapter-4
npm run styles && node-sass src/styles/styles.scss -o static/ -w src/styles --watch --recursive

[nodemon] 1.18.3
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node -r @std/esm ./db/run.js
[nodemon] 1.18.3
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node index.js

[email protected] styles D:\letters-social-chapter-4
node-sass -q src/styles/styles.scss -o static/

npm[6516]: src\node_file.cc:943: Assertion (argc) == (4)' failed. 1: 00007FF762F9ECE5 2: 00007FF762F78196 3: 00007FF762F78261 4: 00007FF762F3950E 5: 00007FF7637A2E52 6: 00007FF7637A42ED 7: 00007FF7637A3349 8: 00007FF7637A322B 9: 0000029E6635C5C1 [nodemon] app crashed - waiting for file changes before starting... ==> 🌎 Newsfeed is running on port 3100 βœ… Project is running at http://localhost:3000/ webpack output is served from http://localhost:3000/ 404s will fallback to /index.html Hash: 9a20445fae101ee2909d Version: webpack 3.12.0 Time: 13412ms Asset Size Chunks Chunk Names static/assets/fonts/fontawesome-webfont.eot 166 kB [emitted] static/assets/fonts/fontawesome-webfont.svg 444 kB [emitted] [big] static/assets/fonts/fontawesome-webfont.ttf 166 kB [emitted] static/assets/fonts/fontawesome-webfont.woff2 77.2 kB [emitted] static/assets/fonts/fontawesome-webfont.woff 98 kB [emitted] bundle.js 1.53 MB 0 [emitted] [big] main bundle.js.map 1.83 MB 0 [emitted] main index.html 4.1 kB [emitted] [./node_modules/url/url.js] ./node_modules/url/url.js 23.3 kB {0} [built] [./node_modules/webpack-dev-server/client/index.js?http://localhost:3000] (webpack)-dev-server/client?http://localhost:3000 7.93 kB {0} [built] [./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built] [./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built] [./node_modules/webpack/hot ^\.\/log$] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built] [./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.61 kB {0} [built] [./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 77 bytes {0} [built] [./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.31 kB {0} [built] [./node_modules/webpack/hot/log.js] (webpack)/hot/log.js 1.04 kB {0} [built] [0] multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server ./src/index 52 bytes {0} [built] [./src/app.js] ./src/app.js 10.8 kB {0} [built] [./src/index.js] ./src/index.js 782 bytes {0} [built] [./src/shared/crash.js] ./src/shared/crash.js 157 bytes {0} [built] [./src/shared/vendor.js] ./src/shared/vendor.js 121 bytes {0} [built] [./src/styles/styles.scss] ./src/styles/styles.scss 1.22 kB {0} [built] + 197 hidden modules Child html-webpack-plugin for "index.html": 1 asset [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs 5.03 kB {0} [built] [./node_modules/lodash/lodash.js] ./node_modules/lodash/lodash.js 540 kB {0} [built] [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built] [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built] webpack: Compiled successfully. [nodemon] restarting due to changes... [nodemon] starting node -r @std/esm ./db/run.js[nodemon] restarting due to changes... [nodemon] startingnode index.jsnode-sass[5712]: src\node_file.cc:943: Assertion(argc) == (4)' failed.
1: 00007FF762F9ECE5
2: 00007FF762F78196
3: 00007FF762F78261
4: 00007FF762F3950E
5: 00007FF7637A2E52
6: 00007FF7637A42ED
7: 00007FF7637A3349
8: 00007FF7637A322B
9: 000003CAECA5C5C1
[nodemon] app crashed - waiting for file changes before starting...
==> 🌎 Newsfeed is running on port 3100 βœ…
[nodemon] restarting due to changes...
[nodemon] starting node -r @std/esm ./db/run.js
[nodemon] restarting due to changes...
[nodemon] starting node index.js
node-sass[6540]: src\node_file.cc:943: Assertion (argc) == (4)' failed. 1: 00007FF762F9ECE5 2: 00007FF762F78196 3: 00007FF762F78261 4: 00007FF762F3950E 5: 00007FF7637A2E52 6: 00007FF7637A42ED 7: 00007FF7637A3349 8: 00007FF7637A322B 9: 00000169FBF5C5C1 [nodemon] app crashed - waiting for file changes before starting... ==> 🌎 Newsfeed is running on port 3100 βœ… [nodemon] restarting due to changes... [nodemon] restarting due to changes... [nodemon] starting node -r @std/esm ./db/run.js[nodemon] startingnode index.jsnode-sass[6036]: src\node_file.cc:943: Assertion(argc) == (4)' failed.
1: 00007FF762F9ECE5
2: 00007FF762F78196
3: 00007FF762F78261
4: 00007FF762F3950E
5: 00007FF7637A2E52
6: 00007FF7637A42ED
7: 00007FF7637A3349
8: 00007FF7637A322B
9: 000001A462E5C5C1
[nodemon] app crashed - waiting for file changes before starting...
==> 🌎 Newsfeed is running on port 3100 βœ…

[email protected]: Permission denied (publickey).

  1. I fork the repo
  2. git clone https://github.com/Chawki726/letters-social
    entire code downloaded.
  3. git remote add upstream [email protected]:react-in-action/letters-social.git
  4. git fetch upstream chapter-5-6:chapter-5-6
    Error i got

$ git fetch upstream
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Build failed:

Failed to install the dependencies for the app. Got this:

Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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/tema/.npm/_logs/2018-07-25T13_25_04_593Z-debug.log

It looks like there's something wrong with node-sass. Any ideas how to fix this?
The OS is macOS 10.13.6; node v10.7.0; npm 6.0.1

Thanks.

Npm install trouble

Hello, on chapter-4 branch i have some problem with npm install, from console:

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\bulat\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\OSPanel\\
domains\\react-in-action\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\OSPanel\\domains\\react-in-action\\node_modules\\grpc\\src\\node
\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\OSPanel\domains\react-in-action\node_modules\grpc
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:
\OSPanel\domains\react-in-action\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\OSPanel\domains\react-in-action\node_modules\grpc\src\node\extension
_binary\node-v64-win32-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\OSPanel\domains\react-in-action\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\OSPanel\\domains\\react-in-action\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library
"
node-pre-gyp ERR! cwd C:\OSPanel\domains\react-in-action\node_modules\grpc
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\OSPanel\domains\react-in-actio
n\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\OSPanel\domains\react-in-action\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unkn
own' (1)

Problems with Chapter 4

I have problems running the npm run db:seed and npm run dev.

I have uninstalled and reinstalled node_modules. I then had to uninstall and reinstall node-sass as I was getting message that the version I had would not run with Windows 64bit.

When I ran dbseed I had the error you (Mark T) indicated from about 2 years back and made the recommended changes to pluggins for .babelrc .

When I ran db:seed I had errors per the log below.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Users\jterr\Documents\NodeProjects\Node\node.exe',
1 verbose cli 'C:\Users\jterr\Documents\NodeProjects\Node\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'db:seed'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predb:seed', 'db:seed', 'postdb:seed' ]
5 info lifecycle [email protected]predb:seed: [email protected]
6 info lifecycle [email protected]
db:seed: [email protected]
7 verbose lifecycle [email protected]db:seed: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
db:seed: PATH: C:\Users\jterr\Documents\NodeProjects\Node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\jterr\Documents\NodeProjects\letters-social-chapter-4\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Users\jterr\Documents\NodeProjects\GettingStarted;C:\Users\jterr\Documents\NodeProjects\Node;C:\Program Files\Git\cmd;C:\Program Files\OpenSSL-Win64\bin;C:\Users\jterr\AppData\Local\Microsoft\WindowsApps;C:\Users\jterr\AppData\Roaming\npm;C:\Users\jterr\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\heroku\bin;
9 verbose lifecycle [email protected]db:seed: CWD: C:\Users\jterr\Documents\NodeProjects\letters-social-chapter-4
10 silly lifecycle [email protected]
db:seed: Args: [ '/d /s /c', 'node -r @std/esm db/seed.js' ]
11 silly lifecycle [email protected]db:seed: Returned: code: 134 signal: null
12 info lifecycle [email protected]
db:seed: Failed to exec db:seed script
13 verbose stack Error: [email protected] db:seed: node -r @std/esm db/seed.js
13 verbose stack Exit status 134
13 verbose stack at EventEmitter. (C:\Users\jterr\Documents\NodeProjects\Node\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:321:20)
13 verbose stack at ChildProcess. (C:\Users\jterr\Documents\NodeProjects\Node\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:321:20)
13 verbose stack at maybeClose (internal/child_process.js:1026:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\jterr\Documents\NodeProjects\letters-social-chapter-4
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\Users\jterr\Documents\NodeProjects\Node\node.exe" "C:\Users\jterr\Documents\NodeProjects\Node\node_modules\npm\bin\npm-cli.js" "run" "db:seed"
18 verbose node v13.8.0
19 verbose npm v6.13.6
20 error code ELIFECYCLE
21 error errno 134
22 error [email protected] db:seed: node -r @std/esm db/seed.js
22 error Exit status 134
23 error Failed at the [email protected] db:seed script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 134, true ]

branch 5-6 npm run dev fails (nvm 8.12.0 & db:seed)

npm run dev

[email protected] dev /home/cajadeleones/reactbook/letters-social
NODE_ENV=development npm-run-all -p api client:dev server:dev styles:w

[email protected] server:dev /home/cajadeleones/reactbook/letters-social
nodemon --config nodemon.json index.js

[email protected] api /home/cajadeleones/reactbook/letters-social
nodemon -x node -r @std/esm ./db/run.js

[email protected] client:dev /home/cajadeleones/reactbook/letters-social
webpack-dev-server --config ./build/webpack.config.js

[email protected] styles:w /home/cajadeleones/reactbook/letters-social
npm run styles && node-sass src/styles/styles.scss -o static/ -w src/styles --watch --recursive

module.js:550
throw err;
^

Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/cajadeleones/reactbook/letters-social/node_modules/chokidar/node_modules/expand-brackets/index.js:14:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
module.js:550
throw err;
^

Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/cajadeleones/reactbook/letters-social/node_modules/chokidar/node_modules/expand-brackets/index.js:14:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] api: nodemon -x node -r @std/esm ./db/run.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] api script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! [email protected] server:dev: nodemon --config nodemon.json index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] server:dev 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! /home/cajadeleones/.npm/_logs/2018-09-12T06_42_30_654Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR! /home/cajadeleones/.npm/_logs/2018-09-12T06_42_30_676Z-debug.log
ERROR: "api" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: NODE_ENV=development npm-run-all -p api client:dev server:dev styles:w
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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! /home/cajadeleones/.npm/_logs/2018-09-12T06_42_30_992Z-debug.log

npm run db:seed fails with error 134

Checked out chapter 4 branch. When i run command:
npm run db:seed get error:

npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] db:seed: `node -r @std/esm db/seed.js`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] db:seed script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

What could be wrong? My node version is: v12.17.0 and npm version is: v6.14.4.

webpack errors

After running 'npm install' and seeding the db. I am getting this error:

JSON Server is running
events.js:183
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE 127.0.0.1:3000
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at Server.setupListenHandle [as _listen2] (net.js:1355:14)
at listenInCluster (net.js:1396:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] client:dev: webpack-dev-server --config ./build/webpack.config.js

todos

  • CreateElement
  • mutable, immutable data
  • lifecycle methods
  • state
  • props
  • CSS
  • JSX
  • forms
  • using refs
  • typeahead search
  • server-side rendering
  • redux
  • auth

Got "SyntaxError: Unexpected token import" when run test in "chapter-9" branch

I check out to "chapter-9", then run npm test and got error below

FAIL  test/pages/home.test.js
  ● Test suite failed to run

    /Users/tringocnguyen/working/letters-social/test/setup.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){/* istanbul ignore next */var cov_1f0qdrgp0z = function () {var path = '/Users/tringocnguyen/working/letters-social/test/setup.js',hash = 'e68af4693e3d16586c1ad1795d5a6923e30fff61',global = new Function('return this')(),gcv = '__coverage__',coverageData = { path: '/Users/tringocnguyen/working/letters-social/test/setup.js', statementMap: { '0': { start: { line: 4, column: 0 }, end: { line: 4, column: 45 } }, '1': { start: { line: 6, column: 0 }, end: { line: 9, column: 2 } }, '2': { start: { line: 12, column: 0 }, end: { line: 32, column: 2 } }, '3': { start: { line: 16, column: 12 }, end: { line: 19, column: 14 } }, '4': { start: { line: 26, column: 8 }, end: { line: 30, column: 10 } } }, fnMap: { '0': { name: '(anonymous_0)', decl: { start: { line: 15, column: 21 }, end: { line: 15, column: 22 } }, loc: { start: { line: 15, column: 27 }, end: { line: 20, colum
    
    SyntaxError: Unexpected token import
      
      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:305:17)
      at handle (node_modules/worker-farm/lib/child/index.js:44:8)
      at process.<anonymous> (node_modules/worker-farm/lib/child/index.js:51:3)
      at emitTwo (events.js:126:13)

I googled and figured out that the root cause is JEST automatically set environment to test, while we only have development and production environment in .babelrc (see https://github.com/react-in-action/letters-social/blob/chapter-9/.babelrc).

Then I added below snippet to .babelrc and it worked

        "test": {
            "presets": ["react-app", "env"],
            "plugins": ["transform-class-properties"]
        }

Could you have a look at this issue? I was wondering if my workaround is good enough πŸ˜„

npm start fails in chapter-10-11 branch

Cloned the repo,
changed into the directory
ran npm install
ran npm start

using npm 5.6.0

realize I'm jumping ahead in the book but guessing this should have worked?
Output below:

letters-social cricketgeek$ npm start

[email protected] start /Users/cricketgeek/react/letters-social
NODE_ENV=production pm2 start ./index.js --no-daemon

pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
[2018-08-10 17:23:20] PM2 log: Launching in no daemon mode
[2018-08-10 17:23:20] PM2 log: [PM2] Starting /Users/cricketgeek/react/letters-social/index.js in fork_mode (1 instance)
[2018-08-10 17:23:20] PM2 log: Starting execution sequence in -fork mode- for app name:index id:0
[2018-08-10 17:23:20] PM2 log: App name:index id:0 online
[2018-08-10 17:23:20] PM2 log: [PM2] Done.
[2018-08-10 17:23:20] PM2 log: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ App name β”‚ id β”‚ mode β”‚ pid β”‚ status β”‚ restart β”‚ uptime β”‚ cpu β”‚ mem β”‚ user β”‚ watching β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ index β”‚ 0 β”‚ fork β”‚ 9404 β”‚ online β”‚ 0 β”‚ 0s β”‚ 0% β”‚ 13.5 MB β”‚ cricketgeek β”‚ disabled β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
[2018-08-10 17:23:20] PM2 log: Use pm2 show <id|name> to get more details about an app
[2018-08-10 17:23:20] PM2 log: [--no-daemon] Continue to stream logs
[2018-08-10 17:23:20] PM2 log: [--no-daemon] Exit on target PM2 exit pid=9403
17:23:20 0|index | WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
17:23:20 0|index | WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
17:23:21 0|index | ==> 🌎 Newsfeed is running on port 3000 βœ…

generateStaticMapImage in DisplayMap is using wrong url format for mapbox

In master/src/components/map/DisplayMap.js:

https://api.mapbox.com/styles/v1/mapbox/streets-v10/static/${lat},${lng},12,0,0/600x175?access_token=${process.env.MAPBOX_API_TOKEN}

should be

https://api.mapbox.com/styles/v1/mapbox/streets-v10/static/${lng},${lat},12,0,0/600x175?access_token=${process.env.MAPBOX_API_TOKEN}

package.json single quotes in scripts nodemon call cause problem

when exe npm run dev in cmd console got following error:

[nodemon] starting node index.js
''node' is not recognized as an internal or external command,
operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...

looked package.json and remove single quote at this line, problem solved:

before change:
"api": "nodemon -x 'node -r @std/esm ./db/run.js --inspect'",

after change:
"api": "nodemon -x node -r @std/esm ./db/run.js --inspect",

this happened on all level package.json file ie master and chapter branches

SyntaxError: Unexpected token import, chapter-4

Looks like I got the same error as in #543 when I ran npm run db:seed in 'chapter-4' branch.
I added transform-es2015-modules-commonjs to the array of plugins in .babelrc which is in the project's root directory, but it didn't work. Maybe I should add that line to one of the other 11 .babelrc files that come with the project, but which one and how do I edit?

The error stack:
(node v.8.11.3, npm v.5.6.0, NODE_ENV=development)
$ npm run db:seed

[email protected] db:seed /Users/tema/coding/new_ltr/letters-social
node -r @std/esm db/seed.js
/Users/tema/coding/new_ltr/letters-social/db/seed.js:1
(function(exports,require,module,__filename,__dirname){import { join } from 'path';
                                 ^^^^^^
SyntaxError: Unexpected token import
   at createScript (vm.js:80:10)
   at runInThisContext (vm.js:139:10)
   at Object.Module._extensions..js (module.js:663:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] db:seed: `node -r @std/esm db/seed.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] db:seed 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/tema/.npm/_logs/2018-08-01T08_03_20_403Z-debug.log

Error

I can not start the project, dependencies are outdated. Tell me what to do?

The start branch is missing

In the first lines of Chapter 4.3. (Starting to create Letter Social) we read:

β€œYou should be on the start branch when starting out, but if you want to skip to the end of the chapter you can check out the chapter-4 branch”

But there is no β€˜start’ branch in my repository. And if I switch to β€˜chapter-4’ then (as promised) I’ll find the code for the end of Chapter 4.

If we go back a few sections, here’s what we’ll find in 4.1.1. Getting the source code:

git clone [email protected]:react-in-action/letters-social.git
git checkout chapter-4

That will clone the repository in the current directory and switch to the start branch (the starting branch for the project).

Obviously that won’t.

So the question is: Where do I find the start branch?

Thanks

The Server error? npm run dev is working but connected port 3000, screen said 'Welcome to Express'

port 3000 was Express Welcome to Express and error message.
port 3100 is Not Found

Error: Not found
at /Users/mac/Desktop/letters-social/server/server.js:43:17
at Layer.handle [as handle_request] (/Users/mac/Desktop/letters-social/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/mac/Desktop/letters-social/node_modules/express/lib/router/index.js:317:13)
at /Users/mac/Desktop/letters-social/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/Users/mac/Desktop/letters-social/node_modules/express/lib/router/index.js:335:12)
at next (/Users/mac/Desktop/letters-social/node_modules/express/lib/router/index.js:275:10)
at favicon (/Users/mac/Desktop/letters-social/node_modules/serve-favicon/index.js:68:7)
at Layer.handle [as handle_request] (/Users/mac/Desktop/letters-social/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/mac/Desktop/letters-social/node_modules/express/lib/router/index.js:317:13)
at /Users/mac/Desktop/letters-social/node_modules/express/lib/router/index.js:284:7
GET / 404 30.050 ms - -

and error message in terminal

npm ERR! code ELIFECYCLE
npm ERR! errno 130
npm ERR! [email protected] api: nodemon -x node -r @std/esm ./db/run.js
npm ERR! Exit status 130
npm ERR!
npm ERR! Failed at the [email protected] api 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/mac/.npm/_logs/2019-02-20T08_56_13_371Z-debug.log

What's problem?

mac os
"node": "8.9.3",
"npm": "5.5.1"

Error: Using `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables

Steps to reproduce the issue

  1. Clone the repo
  2. git checkout chapter-4
  3. npm install
  4. npm run dev

Error: Using babel-preset-react-app requires that you specify NODE_ENV or BABEL_ENV environment variables. Validvalues are "development", "test", and "production". Instead, received: undefined. (While processing preset: "/Users/haidermalik504/Documents/React/code/letters-social/node_modules/babel-preset-react-app/index.js")

Node version - v8.9.4

Could you tell me how to resolve this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.