cannot read property of undefined code example

Example 1: TypeError: Cannot read property 'createElement' of undefined

TypeError: Cannot read property 'createElement' of undefined
Originally had:
import { React, Fragment } from 'react';

To solve, instead use:
import React, { Fragment } from 'react';

Example 2: Cannot read property 'kind' of undefined

----------- re-run server --------------
ng serve

Example 3: Cannot read property 'match' of undefined

manually remove package-lock.json
manually remove bin folder in node_modules

npm install