Can not Open Atom package file on dev mode


#1

I generated a new package directory and execute apm develop new_package_name.
Then I attempted to open package.json on develop mode with below command:

cd new_package_dir
atom -d package.json

These commands seem to exited successflly, But Atom does not open TextEditor window of package.json .

How can I open file of developing package on dev mode?


#2

You can open atom with atom -d . to open the entire directory structure as a project. Then once Atom is open you can navigate using the Tree View to open whatever files you like.

All packages in ~/.atom/dev/packages are loaded automatically when you run Atom in Dev Mode. You don’t need to load them individually or manually.


#3

Thanks for reply!

I tried below commands, But Atom Does not open editing window like a picture.

cd new_package_dir
atom -d .

There are just a few on menu bar, Only Atom and `Exit’ exist.

I waited several minutes, Atom does not open window.

Atom:1.8.0, OS:OS X 10.11.5


#4

It is possible that your package is causing some sort of problem with Atom’s startup. You might try using the --log-file or --foreground options to get some more logging information about what is going wrong.


#5

I executed atom --forground.
The following is output message.

[8227:0609/205237:WARNING:resource_bundle.cc(305)] locale_file_path.empty() for locale English
2016-06-09 20:52:37.930 Atom[8227:76645] Cannot find module '/Users/username/github/atom/src/browser/atom-application'
2016-06-09 20:52:37.938 Atom[8227:76645] Error: Cannot find module '/Users/username/github/atom/src/browser/atom-application'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/browser/main.js:60:25)
    at emitOne (events.js:82:20)
    at EventEmitter.emit (events.js:169:7)

Is this similar to atom issue #11712?


#6

Ah, no … this isn’t the same Issue. Atom is looking for the source code for Atom at $ATOM_DEV_RESOURCE_PATH/atom because you’re launching in Dev Mode. And since it appears that you don’t have the source code downloaded, it is crashing.

I can’t reproduce this using Atom v1.8.0 on Mac OS X 10.11.5, even after I move my directories around.

I also just tried deleting my Atom source completely and still can’t reproduce it.


#7

I downloaded Atom from https://atom.io/download/mac
then extend zip file, Atom.app moved to /Applications.

Note that ~/github/atom is my project home directory.
this setting related to this problem?


#8

If ~/github/atom exists, Atom expects to find the Atom source code there when running in Dev Mode. This allows people to debug custom builds of Atom without having to rebuild Atom completely. Since you’re using that directory for other things, Atom doesn’t load properly when running in Dev Mode.


#9

Thanks, this issue was resolved!

I deleted ~/github/atom and change my project home directory.
then Atom running in dev mode atom -d . .
Atom opened window expectedly.

Thanks for helping!