React App: Starting inspector on localhost:9200 failed: address not available

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.

Glitch app: Glitch :・゚✧

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.

1 Like

Oh, and you had the Debugger tool on, I turned that off and it made the 9200 port error go away for me.

1 Like

Thanks for you help, the misimport was the culprit. The error message could have been clearer though.

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!

4 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.