Giter Club home page Giter Club logo

js-stack-walkthrough's Introduction

js-stack-walkthrough's People

Contributors

verekia 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-stack-walkthrough's Issues

Problem with Flow

When I run yarn test in chapter 02 after adding the Flow. I get following error:

yarn test v0.24.6
$ eslint src && flow 
Launching Flow server for /Users/alok/Web/FullStack-React
Spawned flow server (pid=28585)
Logs will go to /private/tmp/flow/zSUserszSalokzSWebzSFullStack-React.log
node_modules/eslint-plugin-jsx-a11y/src/rules/media-has-caption.js:53
                                                    v--------------------------------------
 53:       const trackChildren: Array<JSXElement> = node.children.filter((child: Node) => {
 54:         if (child.type !== 'JSXElement') {
 55:           return false;
...:
 60:       });
           -^ call of method `filter`. Function cannot be called on any member of intersection type
 53:       const trackChildren: Array<JSXElement> = node.children.filter((child: Node) => {
                                                    ^^^^^^^^^^^^^^^^^^^^ intersection
  Member 1:
  231:     filter(callbackfn: typeof Boolean): Array<$NonMaybeType<T>>;
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: /private/tmp/flow/flowlib_1ffc7b83/core.js:231
  Error:
                                                                           v-----------------
   53:       const trackChildren: Array<JSXElement> = node.children.filter((child: Node) => {
   54:         if (child.type !== 'JSXElement') {
   55:           return false;
  ...:
   60:       });
             ^ statics of function. This type is incompatible with
       v----------------------
  106: declare class Boolean {
  107:     constructor(value?: mixed): void;
  108:     static (value:any):boolean;
  ...:
  111: }
       ^ statics of Boolean. See lib: /private/tmp/flow/flowlib_1ffc7b83/core.js:106
  Member 2:
  232:     filter(callbackfn: (value: T, index: number, array: Array<T>) => any, thisArg?: any): Array<T>;
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: /private/tmp/flow/flowlib_1ffc7b83/core.js:232
  Error:
  4924:   children: Array<Node>;
                          ^^^^ object type. This type is incompatible with the expected param type of. See: node_modules/ast-types-flow/lib/types.js:4924
   53:       const trackChildren: Array<JSXElement> = node.children.filter((child: Node) => {
                                                                                   ^^^^ Node

node_modules/eslint-plugin-jsx-a11y/src/rules/media-has-caption.js:59
 59:         return isTrackType(context, elementType(child.openingElement));
                                                           ^^^^^^^^^^^^^^ property `openingElement`. Property not found in
 59:         return isTrackType(context, elementType(child.openingElement));
                                                     ^^^^^ Node


Found 2 errors
error Command failed with exit code 2.

In chapter 06 the pm logs 'Cannot find module' error

@verekia When running the command yarn prod:start the PM logs error are as follows:

/Users/xaviertung/.pm2/logs/server-error-0.log last 15 lines:
0|server   |     at Object.Module._extensions..js (module.js:580:10)
0|server   |     at Module.load (module.js:488:32)
0|server   |     at tryModuleLoad (module.js:447:12)
0|server   |     at Function.Module._load (module.js:439:3)
0|server   | Error: Cannot find module './component/nav.jsx'
0|server   |     at Function.Module._resolveFilename (module.js:470:15)
0|server   |     at Function.Module._load (module.js:418:25)
0|server   |     at Module.require (module.js:498:17)
0|server   |     at require (internal/module.js:20:19)
0|server   |     at Object.<anonymous> (/Users/xaviertung/WebstormProjects/js-stack-from-scratch-demo/lib/shared/app.js:15:12)
0|server   |     at Module._compile (module.js:571:32)
0|server   |     at Object.Module._extensions..js (module.js:580:10)
0|server   |     at Module.load (module.js:488:32)
0|server   |     at tryModuleLoad (module.js:447:12)
0|server   |     at Function.Module._load (module.js:439:3)

But the server started properly, what happend?
Thx!

06-react-router-ssr-helmet Async Not Working

Hello,

Thank you for the examples. But I could not run async in the example named 06-react-router-ssr-helmet.
In addition, the src/client/index.js code did not work at all. Even though I deleted the code, it did not give an error either. Can you help me with this? @verekia

code-env command not found

In chapter 3 at the last stage, when I execute yarn prod:start, I am getting following error:

yarn prod:start v0.24.6
$ cross-env NODE_ENV=production pm2 start lib/server && pm2 logs 
sh: cross-env: command not found
error Command failed with exit code 127.

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.