Code for each chapter of the JavaScript-Stack-from-Scratch tutorial.
The last 2 chapters are in the JS-Stack-Boilerplate repository:
Created by @verekia โ verekia.com.
License: MIT
Code for each chapter of the JavaScript-Stack-from-Scratch tutorial.
License: MIT License
Code for each chapter of the JavaScript-Stack-from-Scratch tutorial.
The last 2 chapters are in the JS-Stack-Boilerplate repository:
Created by @verekia โ verekia.com.
License: MIT
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.
@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!
my eslintrc.json
looks like this{ "extends": "airbnb", "rules": { "no-unexpected-multiline": 2, "linebreak-style": [2, "windows"] } }
but am still getting errors plus i also go this Cannot read config file: c:\Users\USER\Desktop\project\portfolio\.eslintrc.json Error: Unexpected end of JSON input
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.