atom-ctags
atom-ctags copied to clipboard
Failed to activate the atom-ctags package(Error: At Cannot find module)
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
+1
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')
@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
@1dot75cm @farwayer could you please tell me which linux desktop version you use? so i can reproduce this issue, thanks
ArchLinux, atom was installed from here.
Fedora 23, use this repository. @yongkangchen
the same:
[Enter steps to reproduce below:]
- ...
- ...
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
Same here. Fedora 23
Ubuntu 14.04 LTS 64-bit
Happens on Mac too
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
Happening on Windows 8 as well
os x too.
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.
Happens on Ubuntu 16.04 too.
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.
Happens on Fedora 24 too
Getting this issue on mac still
I had this issue as well. Uninstalling, restarting Atom, and then re-installing the package fixed it for me, though.
Happens on Fedora 24
Having this issue now on 1.10.0-beta1. Reinstall didn't help.
1.9.2 seems ok.
@DynamoGeek's solution solved it for me too.
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.
+1
+1 My ctags crash immediately after I updated my Atom from 1.9.8 to 1.10 . @tqueiroz's solution solved my problem.
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
Regarding previous comment, full path to file is ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee.
https://github.com/yongkangchen/atom-ctags/issues/145#issuecomment-243997434
Fixed it for me on MacOS as well.
@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! 👍
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')