avichauhan6832 / front-end-web-development-with-react Goto Github PK
View Code? Open in Web Editor NEWCoursera Course offered by The Hong Kong University of Science and Technology - Front-End Web Development with React
Coursera Course offered by The Hong Kong University of Science and Technology - Front-End Web Development with React
Step1: Check out confusion project
Step 2: D:\React\confusion> npm install
Step 3: D:\React\confusion> npm start
[email protected] start D:\React\confusion
react-scripts start
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"babel-jest": "^24.9.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-jest was detected higher up in the tree:
D:\React\confusion\node_modules\babel-jest (version: 21.2.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if D:\React\confusion\node_modules\babel-jest is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls babel-jest in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-jest.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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! C:\Users\hitsingh\AppData\Roaming\npm-cache_logs\2021-01-19T04_34_11_080Z-debug.log
Uncaught TypeError: Cannot read property 'image' of undefined
at RenderCard (HomeComponent.js:23)
at renderWithHooks (react-dom.development.js:14796)
at mountIndeterminateComponent (react-dom.development.js:17408)
at beginWork (react-dom.development.js:18486)
at HTMLUnknownElement.callCallback (react-dom.development.js:189)
at Object.invokeGuardedCallbackDev (react-dom.development.js:238)
at invokeGuardedCallback (react-dom.development.js:291)
at beginWork$1 (react-dom.development.js:23052)
at performUnitOfWork (react-dom.development.js:22019)
at workLoopSync (react-dom.development.js:21992)
at performSyncWorkOnRoot (react-dom.development.js:21610)
at react-dom.development.js:11130
at unstable_runWithPriority (scheduler.development.js:656)
at runWithPriority$1 (react-dom.development.js:11076)
at flushSyncCallbackQueueImpl (react-dom.development.js:11125)
at flushSyncCallbackQueue (react-dom.development.js:11113)
at unbatchedUpdates (react-dom.development.js:21766)
at legacyRenderSubtreeIntoContainer (react-dom.development.js:24573)
at Object.render (react-dom.development.js:24656)
at Module../src/index.js (index.js:10)
at webpack_require (bootstrap:785)
at fn (bootstrap:150)
at Object.0 (comments.js:155)
at webpack_require (bootstrap:785)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
The above error occurred in the component:
in RenderCard (at HomeComponent.js:42)
in div (at HomeComponent.js:41)
in div (at HomeComponent.js:37)
in div (at HomeComponent.js:36)
in Home (at MainComponent.js:51)
in HomePage (created by Route)
in Route (at MainComponent.js:83)
in Switch (at MainComponent.js:82)
in Transition (created by CSSTransition)
in CSSTransition (at MainComponent.js:81)
in div (created by TransitionGroup)
in TransitionGroup (at MainComponent.js:80)
in div (at MainComponent.js:78)
in Main (created by Connect(Main))
in Connect(Main) (created by Route)
in Route (created by withRouter(Connect(Main)))
in withRouter(Connect(Main)) (at App.js:17)
in div (at App.js:16)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:15)
in Provider (at App.js:14)
in App (at src/index.js:10)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console. @ index.js:1406
react-dom.development.js:11143 Uncaught TypeError: Cannot read property 'image' of undefined
at RenderCard (HomeComponent.js:23)
at renderWithHooks (react-dom.development.js:14796)
at mountIndeterminateComponent (react-dom.development.js:17408)
at beginWork (react-dom.development.js:18486)
at HTMLUnknownElement.callCallback (react-dom.development.js:189)
at Object.invokeGuardedCallbackDev (react-dom.development.js:238)
at invokeGuardedCallback (react-dom.development.js:291)
at beginWork$1 (react-dom.development.js:23052)
at performUnitOfWork (react-dom.development.js:22019)
at workLoopSync (react-dom.development.js:21992)
at performSyncWorkOnRoot (react-dom.development.js:21610)
at react-dom.development.js:11130
at unstable_runWithPriority (scheduler.development.js:656)
at runWithPriority$1 (react-dom.development.js:11076)
at flushSyncCallbackQueueImpl (react-dom.development.js:11125)
at flushSyncCallbackQueue (react-dom.development.js:11113)
at unbatchedUpdates (react-dom.development.js:21766)
at legacyRenderSubtreeIntoContainer (react-dom.development.js:24573)
at Object.render (react-dom.development.js:24656)
at Module../src/index.js (index.js:10)
at webpack_require (bootstrap:785)
at fn (bootstrap:150)
at Object.0 (comments.js:155)
at webpack_require (bootstrap:785)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
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.