Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading /Users/myuser/Code/OLD_PROJECT_NAME/node_modules/devtron/manifest.json failed

I recently set up a new project based on https://electron-react-boilerplate.js.org. This worked fine for a little bit, then I decided to start over again and re-cloned the electron-react-boilerplate Git repo to a new directory and deleted the old one.

Now when I run yarn run dev in the new project directory, I get a strange error:

Reading /Users/myuser/Code/OLD_PROJECT_NAME/node_modules/devtron/manifest.json failed. Error: ENOENT: no such file or directory, open '/Users/myuser/Code/OLD_PROJECT_NAME/node_modules/devtron/manifest.json' at Object.fs.openSync (fs.js:577:3) at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:166:20) at Object.fs.readFileSync (fs.js:483:33) at Object.fs.readFileSync (ELECTRON_ASAR.js:563:29) at getManifestFromPath (/Users/myuser/Code/NEW_PROJECT_NAME/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:30:26) at Function.BrowserWindow.addExtension (/Users/myuser/Code/NEW_PROJECT_NAME/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:362:22) at Function.BrowserWindow.addDevToolsExtension (/Users/myuser/Code/NEW_PROJECT_NAME/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:394:40) at App.<anonymous> (/Users/myuser/Code/NEW_PROJECT_NAME/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/browser/chrome-extension.js:423:23) at Object.onceWrapper (events.js:273:13) at App.emit (events.js:187:15)

Note that for some reason, it tries to read the manifest.json file from the old project directory which doesn't even exist anymore. I've grepped the entire new directory for occurrences of the old project name hunting down what could be wrong but nothing comes out of it.

I've tried removing node_modules, didn't help.

I also tried running yarn cache clean but that didn't help either.

Where could it possibly be getting the old project directory from?

I'm on macOS Mojave with Node 11.4.0.

like image 420
damd Avatar asked Aug 25 '26 00:08

damd


2 Answers

I experienced the same problem after experimenting with Electron React Boilerplate (ERB).

There's a user-wide Electron configuration file with the name DevTools Extensions which stores folder paths related to Chrome DevTools. The file can be found at the following locations:

Linux:     ~/.config/Electron/DevTools Extensions
Mac:       ~/Library/Application Support/Electron/DevTools Extensions
Windows:   %appdata%\Electron\DevTools Extensions

Mac path as per agmangas' comment, Windows path as per ekundayo's answer.

In my case, the file contained the path into my old/experimental ERB project, i.e. the path at the top of the error message.

Deleting the offending path from this file solved the issue for me.

like image 132
snwflk Avatar answered Aug 27 '26 16:08

snwflk


I had the same problem before. Highly possible that you already have another electron instance running in the background. Start activity monitor and get rid of all running electron instances then try again.

like image 21
alan850627 Avatar answered Aug 27 '26 17:08

alan850627



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!