You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am experiencing this error when I use the package.
Compiled with problems:
×
ERROR
Cannot find module './chaos-react.cjs.development.js'
at webpackMissingModule (http://localhost:3000/static/js/bundle.js:7050:69)
at ./node_modules/react-chaos/dist/index.js (http://localhost:3000/static/js/bundle.js:7050:176)
at options.factory (http://localhost:3000/static/js/bundle.js:41417:31)
at __webpack_require__ (http://localhost:3000/static/js/bundle.js:40840:33)
at fn (http://localhost:3000/static/js/bundle.js:41074:21)
at ./src/App.js (http://localhost:3000/static/js/bundle.js:17:69)
at options.factory (http://localhost:3000/static/js/bundle.js:41417:31)
at __webpack_require__ (http://localhost:3000/static/js/bundle.js:40840:33)
at fn (http://localhost:3000/static/js/bundle.js:41074:21)
at ./src/index.js (http://localhost:3000/static/js/bundle.js:119:62)
ERROR in ./node_modules/react-chaos/dist/index.js 6:2-62
Module not found: Error: Can't resolve './chaos-react.cjs.development.js' in '/home/xxxxx/chaos-demo/node_modules/react-chaos/dist'
What I tried
Deleting package-lock.json and running npm install
Verified that the module 'react-chaos' is installed in my project by running npm list react-chaos
my code
importReactfrom'react';importwithChaosfrom'react-chaos';// Define a componentconstComponentToWrap=()=>{// Simulate an errorif(Math.random()<0.5){thrownewError('Oops! Something went wrong.');}return<p>I may have chaos.</p>;};// Wrap the component with ChaosconstComponentWithChaos=withChaos(ComponentToWrap,8,'Custom error message: Chaos level 8');// Create a component with Chaos level 8 and a custom error messageconstApp=()=>{return(<div><h1>React Chaos Demo</h1><ComponentWithChaos/></div>);};exportdefaultApp;
The text was updated successfully, but these errors were encountered:
Hi, I am experiencing this error when I use the package.
What I tried
package-lock.json
and runningnpm install
npm list react-chaos
my code
The text was updated successfully, but these errors were encountered: