yongkangchen / atom-ctags

better autocomplete for atom, using ctags
https://atom.io/packages/atom-ctags
MIT License
87 stars 35 forks source link

Failed to activate the atom-ctags package(Error: At Cannot find module) #145

Open farwayer opened 8 years ago

farwayer commented 8 years ago

Atom Version: 1.4.0 System: linux 4.3.3-2-ck Thrown From: atom-ctags package, v4.4.2

Stack Trace

Failed to activate the atom-ctags package

At Cannot find module '/usr/lib/electron/resources/app.asar.unpacked/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node'

Error: Cannot find module '/usr/lib/electron/resources/app.asar.unpacked/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (/usr/lib/atom/src/module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/home/farwayer/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)
    at Object.<anonymous> (/home/farwayer/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/home/farwayer/.atom/packages/atom-ctags/lib/ctags-cache.coffee:3:9)
    at Object.<anonymous> (/home/farwayer/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:50:27)
    at Object.module.exports.activate (/home/farwayer/.atom/packages/atom-ctags/lib/main.coffee:45:19)
    at Package.module.exports.Package.activateNow (/usr/lib/atom/src/package.js:183:20)
    at /usr/lib/atom/src/package.js:156:32
    at Package.module.exports.Package.measure (/usr/lib/atom/src/package.js:92:15)
    at /usr/lib/atom/src/package.js:149:26
    at Package.module.exports.Package.activate (/usr/lib/atom/src/package.js:146:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/lib/atom/src/package-manager.js:515:21)
    at /usr/lib/atom/src/package-manager.js:496:29
    at Config.module.exports.Config.transactAsync (/usr/lib/atom/src/config.js:337:18)

Config

{
  "core": {
    "disabledPackages": [
      "about",
      "autocomplete-atom-api",
      "background-tips",
      "bookmarks",
      "welcome",
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-go",
      "language-java",
      "language-make",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-sass",
      "language-shellscript",
      "language-less",
      "language-sql",
      "language-toml",
      "metrics",
      "tree-view",
      "language-cjsx",
      "nuclide-buck-files",
      "nuclide-hack",
      "language-javascript-jsx"
    ],
    "openEmptyEditorOnStart": false,
    "themes": [
      "one-dark-ui",
      "darkular-syntax"
    ]
  }
}

Installed Packages

# User
atom-ctags, v4.4.2
ctrl-last-tab, v0.3.0
cursor-history, v0.5.9
darkular-syntax, v0.3.0
file-icons, v1.6.14
highlight-selected, v0.11.1
language-babel, v2.11.1
language-gitignore, v0.2.0
language-ini, v1.14.0
line-diff-details, v1.2.0
local-history, v3.2.3
nuclide, v0.111.0
saveallthetime, v0.2.1

# Dev
No dev packages
$ ls /usr/lib/electron/resources/
atom.asar  default_app

$ ls /usr/lib/atom/node_modules/symbols-view/node_modules/ctags/build/Release/               
ctags.node
Lujaw commented 8 years ago

+1

1dot75cm commented 8 years ago

Fixes it. @farwayer

$ vim ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee
{Tags} = require(process.resourcesPath + '/../../atom/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node')
#{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node')
yongkangchen commented 8 years ago

@freegodsoul @andronat @AlexKusm @messiasthi @gauravmanchanda @JVimes @michaelkruglos @MartijnDevNull Your comment is about #154, and I will remove these comments. You can try reinstall atom-ctags package and see if #154 still exist

yongkangchen commented 8 years ago

@1dot75cm @farwayer could you please tell me which linux desktop version you use? so i can reproduce this issue, thanks

farwayer commented 8 years ago

ArchLinux, atom was installed from here.

1dot75cm commented 8 years ago

Fedora 23, use this repository. @yongkangchen

lz8773 commented 8 years ago

the same:

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.6.0 System: Mac OS X 10.11.2 Thrown From: atom-ctags package, v4.5.2

Stack Trace

Failed to activate the atom-ctags package

At Module did not self-register.

Error: Module did not self-register.
    at Error (native)
    at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
    at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:137:20)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/MLS/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)
    at Object.<anonymous> (/Users/MLS/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/MLS/.atom/packages/atom-ctags/lib/ctags-cache.coffee:3:9)
    at Object.<anonymous> (/Users/MLS/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.module.exports.activate (/Users/MLS/.atom/packages/atom-ctags/lib/main.coffee:48:19)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:181:20)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:155:32
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:148:26
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:145:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:526:21)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:444:29
    at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:227:18
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

     -8:55.5.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -5:40.1.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)

Config

{
  "core": {
    "disabledPackages": [
      "symbols-view"
    ]
  },
  "atom-ctags": {
    "autoBuildTagsWhenActive": true
  }
}

Installed Packages

# User
activate-power-mode, v0.4.1
atom-ctags, v4.5.2
atom-ternjs, v0.13.2
autocomplete-plus, v2.29.1

# Dev
No dev packages
eladcandroid commented 8 years ago

Same here. Fedora 23

sunkup commented 8 years ago

Ubuntu 14.04 LTS 64-bit

izaera commented 8 years ago

Happens on Mac too

noelleleigh commented 8 years ago

I'm having the same issue on Windows 10 (Build 14316.1000).

Atom Version: 1.6.2 System: Microsoft Windows 10 Pro Insider Preview Thrown From: atom-ctags package, v4.5.2

Stack Trace

Failed to activate the atom-ctags package

At Module did not self-register.

Error: Module did not self-register.
    at Error (native)
    at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
    at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:137:20)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.<anonymous> (file:///C:/Users/noahleigh/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)
    at Object.<anonymous> (file:///C:/Users/noahleigh/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)
    at Module._compile (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.<anonymous> (file:///C:/Users/noahleigh/.atom/packages/atom-ctags/lib/ctags-cache.coffee:3:9)
    at Object.<anonymous> (file:///C:/Users/noahleigh/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1)
    at Module._compile (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.module.exports.activate (file:///C:/Users/noahleigh/.atom/packages/atom-ctags/lib/main.coffee:48:19)
    at Package.module.exports.Package.activateNow (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\package.js:181:20)
    at C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\package.js:155:32
    at Package.module.exports.Package.measure (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\package.js:92:15)
    at C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\package.js:148:26
    at Package.module.exports.Package.activate (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\package.js:145:34)
    at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\package-manager.js:526:21)
    at C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\node_modules\settings-view\lib\package-manager.js:444:29
    at exit (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\node_modules\settings-view\lib\package-manager.js:73:16)
    at triggerExitCallback (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\buffered-process.js:213:47)
    at ChildProcess.<anonymous> (C:\Users\noahleigh\AppData\Local\atom\app-1.6.2\resources\app.asar\src\buffered-process.js:235:18)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

     -3:44.1.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -3:18 symbols-view:toggle-file-symbols (atom-text-editor.editor.is-focused)
     -3:14.8.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -3:14.8.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -3:08.5.0 symbols-view:toggle-file-symbols (atom-text-editor.editor.is-focused)
 34x -3:02.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -2:51.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:35 symbols-view:toggle-project-symbols (atom-text-editor.editor.is-focused)
     -2:32.2.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -2:32.2.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -2:14.1.0 settings-view:open (atom-text-editor.editor.is-focused)
  2x -2:10.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -0:34 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:32.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:29.2.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:28.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "emmet"
    ],
    "projectHome": "D:\\noahleigh\\GitHub"
  },
  "atom-ctags": {}
}

Installed Packages

# User
atom-ctags, v4.5.2
autocomplete-python, v1.7.2
git-time-machine, v1.4.1
language-source-cfg, v0.3.1
linter, v1.11.4
linter-flake8, v1.13.0
minimap, v4.21.0

# Dev
No dev packages
aragacalledpat commented 8 years ago

Happening on Windows 8 as well

ThomasTesla commented 8 years ago

os x too.

tumido commented 8 years ago

A bit better workaround than @1dot75cm mentioned is to use:

{Tags} = require(atom.config.resourcePath + '/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node')

This solution does not require querying the parent folder ../ and is a bit cleaner. However the result is the same.

MohammedAl-Mahdawi commented 8 years ago

Happens on Ubuntu 16.04 too.

MohammedAl-Mahdawi commented 8 years ago

After creating the tags file using ctags -R and activating the package now everything is fine. I think we should create the tags file first then activating this package.

ljhui commented 8 years ago

Happens on Fedora 24 too

jescalan commented 8 years ago

Getting this issue on mac still

DynamoGeek commented 8 years ago

I had this issue as well. Uninstalling, restarting Atom, and then re-installing the package fixed it for me, though.

keramidasceid commented 8 years ago

Happens on Fedora 24

jackcasey commented 8 years ago

Having this issue now on 1.10.0-beta1. Reinstall didn't help.

1.9.2 seems ok.

Skarlso commented 8 years ago

@DynamoGeek's solution solved it for me too.

tqueiroz commented 8 years ago

Seen on 1.10.0-beta7 running on Ubuntu 16.04.

The proposed solutions did not work.

What did the trick was putting the full path to ctags.node on ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee, as in:

{Tags} = require('/usr/share/atom-beta/resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

It solved my problem, but it is not a generic fix.

chrisjimallen commented 8 years ago

+1

johnnyzsefb commented 8 years ago

+1 My ctags crash immediately after I updated my Atom from 1.9.8 to 1.10 . @tqueiroz's solution solved my problem.

ErikFontanel commented 8 years ago

Fix for Ctags 4.5.2

Change the first line in node_modules/ctags/src/ctags.coffee in the atom-ctags package to:

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

Currently I don't have time for a pull request in the https://github.com/yongkangchen/node-ctags.git#hardcode repository

sashaegorov commented 8 years ago

Regarding previous comment, full path to file is ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee.

soupmatt commented 8 years ago

https://github.com/yongkangchen/atom-ctags/issues/145#issuecomment-243997434

Fixed it for me on MacOS as well.

ghost commented 8 years ago

@ErikFontanel you have a trailing tick at the end of your code block, it should read:

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

Correct? Just making sure, thanks for the fix! 👍

devmao commented 8 years ago

Actually in my case I have to user "node_modules/symbols-view/node_modules/ctags" instead of "node_modules/ctags" why?

Atom 1.9.9 Ubuntu 16.04.1 LTS

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node')
ErikFontanel commented 8 years ago

@guilambert thanks, was a Github formatting issue… Fixed it to avoid confusion :)

ErikFontanel commented 8 years ago

@devmao which version of atom-ctags are you using?

blackbaud-jakespirek commented 8 years ago

Working for me now with atom-ctags v5.0.0 and Atom v1.10.0. Thanks!

devmao commented 8 years ago

@ErikFontanel 5.0.0

ErikFontanel commented 8 years ago

@devmao hm weird, I remember that path from an older version of atom-ctags… it should be fixed in 5.0.0 because that ships with the updated node-ctags package.

tanghongbo commented 8 years ago

Fixes it: $sudo find / -name ctags.node

The path

$sudo vim ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee

{Tags} = require('The path')

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/symbols

view/node_modules/ctags/build/Release/ctags.node')

It solved my problem.^_^!!

ghost commented 8 years ago

Upgraded Atom to version 1.10.2, that solved my problem.

lc4t commented 8 years ago

It seems like wrong path for ctags.node @tanghongbo comment was work. Find the true path for ctags.node Then modify ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee

webpolis commented 8 years ago

Hey.. I've followed @tanghongbo recommendation, edited the path like this:

#{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')
{Tags} = require('/usr/share/atom/resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

but now the package triggers an error when I do CTRL-R:

Uncaught TypeError: Tags is not a constructor /home/nico/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:31 Hide Stack Trace TypeError: Tags is not a constructor at Object.exports.createReadStream (/home/nico/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:31:21) at Object.module.exports.readTags (/home/nico/.atom/packages/atom-ctags/lib/ctags-cache.coffee:41:20) at /home/nico/.atom/packages/atom-ctags/lib/ctags-cache.coffee:91:8 at exit (/home/nico/.atom/packages/atom-ctags/lib/tag-generator.coffee:66:5) at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:215:47) at /usr/share/atom/resources/app.asar/src/buffered-process.js:229:18 at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:100:18) at emitOne (events.js:95:20) at Socket.emit (events.js:182:7) at Pipe._onclose (net.js:477:12)

wuxingtao commented 7 years ago

same windows, with atom crash

file: \.atom\packages\atom-ctags\node_modules\ctags\src

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/symbols-view/node_modules/ctags/build/Release/ctags.node')
Jason-mor commented 7 years ago

my version is 1.12.2,have the same problem.

lxw0109 commented 7 years ago

Just like what @1dot75cm said.

atom version: 1.12.2 OS: Ubuntu 16.04 In bash (or any shell you like)

$ sudo updatedb
$ locate ctags.node
$ vim .atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee 

In the ctags.coffee file, replace the path string after "{Tags} = require(atom.config.resourcePath + " with the output of locate ctags.node (only copy the path string starts from "/app.asar...." is enough. e.g.: /app.asar.unpacked/node_modules/ctags/build/Release/ctags.node)

It just works. : )

ioquatix commented 7 years ago

The path that worked for me was /usr/lib/atom/node_modules/ctags/build/Release/ctags.node. Beforehand, it was trying to load from /usr/lib/electron/

sfauch1 commented 7 years ago

The following from @tanghongbo fixed it for me https://github.com/yongkangchen/atom-ctags/issues/145#issuecomment-244583156

vnt commented 7 years ago

[Enter steps to reproduce:]

Atom: 1.17.0-beta3 x64 Electron: 1.3.14 OS: Mac OS X 10.11.6 Thrown From: atom-ctags package 5.0.0

Stack Trace

Failed to activate the atom-ctags package

At Cannot find module '/Applications/WebDesign/Atom Beta.app/Contents/Resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'

Error: Cannot find module '/Applications/WebDesign/Atom Beta.app/Contents/Resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (/Applications/WebDesign/Atom Beta.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/module-cache.js:354:1)
    at Module.require (Applications/WebDesign/Atom%20Beta.app/Contents/Resources/app/static/index.js:40:43)
    at require (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/native-compile-cache.js:66:1)
    at /packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)
    at /packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)
    at Module.get_Module._compile (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .coffee] (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (Applications/WebDesign/Atom%20Beta.app/Contents/Resources/app/static/index.js:47:45)
    at require (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/native-compile-cache.js:66:1)
    at /packages/atom-ctags/lib/ctags-cache.coffee:3:9)
    at /packages/atom-ctags/lib/ctags-cache.coffee:2:1)
    at Module.get_Module._compile (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .coffee] (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (Applications/WebDesign/Atom%20Beta.app/Contents/Resources/app/static/index.js:47:45)
    at require (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/native-compile-cache.js:66:1)
    at Object.activate (/packages/atom-ctags/lib/main.coffee:48:19)
    at Package.module.exports.Package.activateNow (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/package.js:253:1)
    at /Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/package.js:225:1
    at Package.module.exports.Package.measure (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/package.js:99:1)
    at /Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/package.js:218:1
    at Package.module.exports.Package.activate (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/package.js:215:1)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/WebDesign/Atom Beta.app/Contents/Resources/app/src/package-manager.js:642:1)

Commands

Non-Core Packages

atom-beautify 0.29.23 
atom-ctags 5.0.0 
auto-detect-indentation 1.3.0 
autoclose-html 0.23.0 
busy-signal 1.4.1 
cakephp3-snippets 0.5.0 
chrome-color-picker 0.8.0 
color-picker 2.2.5 
color-tabs 0.1.8 
css-color-name 0.4.0 
file-icons 2.1.4 
file-types 0.5.5 
git-plus 7.7.0 
git-time-machine 1.5.9 
goto-definition 1.3.3 
intentions 1.1.2 
language-smarty 1.8.0 
linter 2.1.4 
linter-csslint 1.3.4 
linter-htmlhint 1.3.3 
linter-jshint 3.0.3 
linter-php 1.3.2 
linter-ui-default 1.2.3 
minimap 4.27.1 
minimap-find-and-replace 4.5.2 
open-recent 5.0.0 
pigments 0.39.1 
pinegrow-atom 0.3.1 
recent-projects 0.13.1 
simple-drag-drop-text 0.3.4 
tag 0.5.0 
todo-show 1.11.0 
tool-bar 1.1.0 
tool-bar-atom 1.7.0 
tree-view-autoresize 1.6.0 
liamwhan commented 7 years ago

I think there might be a red herring tripping at least some of us up here. I just had this issue on Ubuntu 16.04, Atom 1.15.0 x64 and it turned out to be due to nvm .

My default environment runs with an ancient version of Node (0.10.*)

I fixed it by launching Atom from a terminal after I had executed nvm use 6.10.2.

I would assume that Atom uses an isolated local copy of Node somehwere (havent checked tho), but if it is just using the version from the execution environment then nvm might cause some issues.

mingjunyang commented 7 years ago

[Enter steps to reproduce:]

  1. I update to Atom to version 1.17.0 few minutes ago. Aton throw this error info .

Atom: 1.17.0 x64 Electron: 1.3.15 OS: Mac OS X 10.12.5 Thrown From: atom-ctags package 5.0.0

Stack Trace

Failed to activate the atom-ctags package

At Cannot find module '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'

Error: Cannot find module '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:354:1)
    at Module.require (Applications/Atom.app/Contents/Resources/app/static/index.js:40:43)
    at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:1)
    at /packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)
    at /packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (Applications/Atom.app/Contents/Resources/app/static/index.js:47:45)
    at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:1)
    at /packages/atom-ctags/lib/ctags-cache.coffee:3:9)
    at /packages/atom-ctags/lib/ctags-cache.coffee:2:1)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (Applications/Atom.app/Contents/Resources/app/static/index.js:47:45)
    at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:1)
    at Object.activate (/packages/atom-ctags/lib/main.coffee:48:19)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:253:1)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:225:1
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:99:1)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:218:1
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:215:1)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:642:1)

Commands

Non-Core Packages

activate-power-mode 1.4.0 
angular2-snippets 0.3.0 
angularjs 0.4.0 
atom-beautify 0.29.24 
atom-bootstrap3 1.2.12 
atom-certificate-view 0.1.0 
atom-ctags 5.0.0 
atom-format-lua 0.1.5 
atom-icons 0.2.2 
atom-material-syntax 1.0.6 
atom-material-ui 2.0.3 
atom-miku 2.2.5 
atom-ternjs 0.18.3 
atom-typescript 11.0.3 
autoclose-html 0.23.0 
autocomplete-erlang 1.1.2 
autocomplete-go 1.3.0 
autocomplete-python 1.8.63 
autocomplete-racer 0.1.3 
builder-go 1.0.1 
busy-signal 1.4.1 
convert-to-utf8 0.2.4 
css-snippets 1.1.0 
es6-javascript 1.0.0 
git-plus 7.8.0 
go-config 1.2.4 
go-debug 1.3.1 
go-get 2.1.1 
go-plus 5.5.5 
gofmt 1.2.0 
gometalinter-linter 1.2.2 
gorename 1.1.0 
intentions 1.1.2 
language-babel 2.61.0 
language-cmake 0.3.0 
language-docker 1.1.7 
language-erlang 3.2.0 
language-ini 1.19.0 
language-javascript-jsx 0.3.7 
language-julia 0.11.0 
language-lua 0.9.11 
language-nginx 0.7.3 
language-pgsql 0.2.3 
language-rust 0.4.10 
language-scala 1.1.8 
language-svg 0.9.2 
language-ts 1.0.2 
language-viml 1.1.3 
language-vue 0.21.2 
language-weex 1.2.0 
linter 2.1.4 
linter-csslint 1.3.4 
linter-erlang 0.4.0 
linter-eslint 8.1.7 
linter-gcc 0.7.1 
linter-lua 1.0.4 
linter-rust 0.8.0 
linter-sass-lint 1.7.4 
linter-shellcheck 1.4.4 
linter-tslint 1.4.0 
linter-ui-default 1.4.0 
minimap 4.28.2 
minimap-git-diff 4.3.1 
navigator-go 1.1.3 
platformio-ide-terminal 2.5.0 
pretty-json 1.6.3 
python-isort 0.0.7 
react 0.16.2 
rust-api-docs-helper 0.5.1 
terminal-plus 0.14.5 
tester-go 2.0.2 
todo-show 1.11.0 
s5s5 commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.17.0 ia32 Electron: 1.3.15 OS: Unknown Windows version Thrown From: atom-ctags package 5.0.0

Stack Trace

Failed to activate the atom-ctags package

At Cannot find module 'C:\Users\superliu\AppData\Local\atom\app-1.17.0\resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'

Error: Cannot find module 'C:\Users\superliu\AppData\Local\atom\app-1.17.0\resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.17.0/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.17.0/resources/app/src/module-cache.js:354:1)
    at Module.require (~/AppData/Local/atom/app-1.17.0/resources/app/static/index.js:40:43)
    at require (~/AppData/Local/atom/app-1.17.0/resources/app/src/native-compile-cache.js:66:1)
    at /packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)
    at /packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.17.0/resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.17.0/resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (~/AppData/Local/atom/app-1.17.0/resources/app/static/index.js:47:45)
    at require (~/AppData/Local/atom/app-1.17.0/resources/app/src/native-compile-cache.js:66:1)
    at /packages/atom-ctags/lib/ctags-cache.coffee:3:9)
    at /packages/atom-ctags/lib/ctags-cache.coffee:2:1)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.17.0/resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .coffee] (~/AppData/Local/atom/app-1.17.0/resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (~/AppData/Local/atom/app-1.17.0/resources/app/static/index.js:47:45)
    at require (~/AppData/Local/atom/app-1.17.0/resources/app/src/native-compile-cache.js:66:1)
    at Object.activate (/packages/atom-ctags/lib/main.coffee:48:19)
    at Package.module.exports.Package.activateNow (~/AppData/Local/atom/app-1.17.0/resources/app/src/package.js:253:1)
    at ~/AppData/Local/atom/app-1.17.0/resources/app/src/package.js:225:1
    at Package.module.exports.Package.measure (~/AppData/Local/atom/app-1.17.0/resources/app/src/package.js:99:1)
    at ~/AppData/Local/atom/app-1.17.0/resources/app/src/package.js:218:1
    at Package.module.exports.Package.activate (~/AppData/Local/atom/app-1.17.0/resources/app/src/package.js:215:1)
    at PackageManager.module.exports.PackageManager.activatePackage (~/AppData/Local/atom/app-1.17.0/resources/app/src/package-manager.js:642:1)

Commands

     -0:20.9.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)

Non-Core Packages

activate-power-mode 1.4.0 
atom-beautify 0.29.24 
atom-ctags 5.0.0 
atom-ternjs 0.18.3 
autocomplete-paths 1.0.5 
busy-signal 1.4.1 
emmet 2.4.3 
file-icons 2.1.5 
highlight-selected 0.13.1 
intentions 1.1.2 
linter 2.1.4 
linter-ui-default 1.4.0 
johngeorgewright commented 7 years ago

I have the same setup as @mingjunyang. I fixed it by editing ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee. Changing line 1:

{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

to:

{Tags} = require(process.resourcesPath + '/app/node_modules/ctags/build/Release/ctags.node')
johannfr commented 7 years ago

Ubuntu 16.04.2 Atom: 1.15.0 x64 After upgrading to atom-ctags 5.1.0 My fix (opposite of what @johngeorgewright needed to do? Sure you didn't paste your fix in the wrong order?): sed -i '1s/app/app.asar.unpacked/' .atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee