Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to activate the atom-ctags package #200

Open
michaelczhou opened this issue Dec 16, 2017 · 6 comments
Open

Failed to activate the atom-ctags package #200

michaelczhou opened this issue Dec 16, 2017 · 6 comments

Comments

@michaelczhou
Copy link

Cannot find module '/opt/atom/resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'
Error: Cannot find module '/opt/atom/resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node' at Module._resolveFilename (module.js:470:15) at Module._resolveFilename (/opt/atom/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.get_Module._resolveFilename (/opt/atom/resources/app/src/module-cache.js:354:58) at Module.require (file:///opt/atom/resources/app/static/index.js:40:43) at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33) at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10) at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1) at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1) at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36) at Object.value [as .coffee] (/opt/atom/resources/app/src/compile-cache.js:239:29) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (file:///opt/atom/resources/app/static/index.js:47:45) at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33) at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/lib/ctags-cache.coffee:3:9) at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1) at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1) at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36) at Object.value [as .coffee] (/opt/atom/resources/app/src/compile-cache.js:239:29) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (file:///opt/atom/resources/app/static/index.js:47:45) at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33) at Object.activate (/home/zc/.atom/packages/atom-ctags/lib/main.coffee:48:19) at Package.module.exports.Package.activateNow (/opt/atom/resources/app/src/package.js:253:25) at /opt/atom/resources/app/src/package.js:225:38 at Package.module.exports.Package.measure (/opt/atom/resources/app/src/package.js:99:21) at /opt/atom/resources/app/src/package.js:218:32

@kkraju4u
Copy link

Temporary fix.

edit ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee and in the first line
{Tags} = require(process.resourcesPath + '/app/node_modules/ctags/build/Release/ctags.node') change app toapp.asar.unpacked, which becomes
{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

@michaelczhou
Copy link
Author

@kkraju4u my file already became as

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

but it's not working

@kkraju4u
Copy link

@michaelczhou If you are using linux, try locate ctags.node in terminal to find the location of the node package. use that location in the coffee file.

@michaelczhou
Copy link
Author

@kkraju4u Thx!

@sergeialimov
Copy link

Hi, is there any solution for mac?
My first line in ctag.coffee is {Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node') by default

@wuyukai879293
Copy link

@sergeialimov for Mac,actually you could find the ctags.node in app directory,/Applications/Atom.app/Contents/Resources/app/node_modules/ctags/build/Release/ctags.node,not in the app.asar.unpacked directory,so you should change the first line of your ctag.coffee file to {Tags} = require(process.resourcesPath + '/app/node_modules/ctags/build/Release/ctags.node'),which just replace the app.asar.unpacked to app,it works for me,wish it would work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants