My React app was working flawlessly until I added context. After adding contexts/StoreContext.js and tweaking App.js, Home.js, NewPost.js, and Profile.js to use the context my project started using 100% CPU and gave the “Starting inspector on localhost:9200 failed: address not available” error. Glitch FAQ mentions this error but wasn’t super helpful. Any insight is appreciated.
Hi! So in StoreContext.js here Glitch :・゚✧ you’re importing uniqueId and initialStore from ‘utils/’ which implies there’s a utils folder in the same folder as StoreContext.js. What you want is the relative path here:
import uniqueId from '../utils/uniqueId.js';
import initialStore from '../utils/initialStore.js';
This should prevent the CRA compiler from tripping up like it is.
The logs did say there was a problem trying to import those files, but it probably got lost in the rest of the console logs. I’ll let the team know the debugger errors should be clearer, though!