sveale / remote-edit

remote-edit
MIT License
146 stars 55 forks source link

Failed to activate the remote-edit package #189

Open tdwinfree opened 8 years ago

tdwinfree commented 8 years ago

Keep getting this error when trying to use Remote-Edit. I've seen other articles about doing a package rebuild but I can't seem to figure it out. Any help would be appreciated.

ruvasik commented 8 years ago

+1 Failed to activate the remote-edit package Cannot find module '/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer' Hide Stack Trace Error: Cannot find module '/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer' at Module._resolveFilename (module.js:339:15) at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52) at Function.Module._load (module.js:290:25) at Module.require (module.js:367:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Object.<anonymous> (/Users/ruvasik/.atom/packages/remote-edit/lib/model/remote-edit-editor.coffee:9:17) at Object.<anonymous> (/Users/ruvasik/.atom/packages/remote-edit/lib/model/remote-edit-editor.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:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Object.<anonymous> (/Users/ruvasik/.atom/packages/remote-edit/lib/main.coffee:3:20) at Object.<anonymous> (/Users/ruvasik/.atom/packages/remote-edit/lib/main.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:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:715:27) at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:173:16) at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:156: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:149:26 at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:146:34) at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:538:21) at /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:342:19 at /Applications/Atom.app/Contents/Resources/app.asar/src/config.js:631:20

jcolesio commented 8 years ago

Seeing the same issue.

Running 1.9.0 on Windows 10 version 1607, Build 14393.5

LukasSkywalker commented 8 years ago

Same on 1.9.0 on OS X 10.11.6

natcl commented 8 years ago

Same

stuwest commented 8 years ago

same

Nollikino commented 8 years ago

I've been troubleshooting this issue, and it seems like the "module" display-buffer has been depricated as per this line of code:

    Object.defineProperty(TextEditor.prototype, 'displayBuffer', {
      get: function() {
        Grim.deprecate("`TextEditor.prototype.displayBuffer` has always been private, but now\nit is gone. Reading the `displayBuffer` property now returns a reference\nto the containing `TextEditor`, which now provides *some* of the API of\nthe defunct `DisplayBuffer` class.");
        return this;
      }
    });

I edited the line that calls this depricated function in remote-edit\lib\main.coffee from: DisplayBuffer = require path.resolve resourcePath, 'src', 'display-buffer' to: DisplayBuffer = TextEditor.prototype.displayBuffer

It seems to have resolved the problem. I've not made any major tests of it though, so proceed at your own peril.

cyberhicham commented 8 years ago

1.9.1 on Linux (Mint 17.2 (Ubuntu 14.04)) here and the same error Upgraded to 1.9.2 : Same same

orange7986 commented 8 years ago

Same 1.9.1 on OS X 10.11.3

c-steiner commented 8 years ago

Same with 1.9.2 on OS X 10.11.6

osbjmg commented 8 years ago

@Nollikino Can you expand on how you did this? I have never hacked on Atom, I hear it's doable but any article you can point to and what file that is in?

Nollikino commented 8 years ago

@osbjmg It's as easy as editing a "text"-file.

The file you'll have to edit is under the .atom folder. Mine is located here: C:\Users\[YourUsernameHere]\.atom\packages\remote-edit\lib\main.coffee

In the beginning of the file you should see the first line that I quoted. Either comment out or delete that row, and then add the second line that I quoted.

Once that is done, restart atom and the error should be gone, and you should be able to use the package once again. Though as I said earlier, I have not done any major function-tests, so beware that it can behave differently than designed.

Also, once the pull-request goes through to the main client your change should be reverted so that it's concurrent to the active codebase.

dmase44 commented 8 years ago

@Nollikino I'm on Win 7 Atom 1.9.0-beta2 remote-edit 1.8.24
I went to the \packages\remote-edit\lib\main.coffee & there was no entry in the code that matches your description to edit.
I did find it in \packages \remote-edit\lib\model\remote-edit-editor.coffee. Did the edit & all is good for now. I was getting the same error w/ pre-release 1.10.0-beta0. So I'm assuming when 1.9.0-beta2 updates we'll have to edit the file again? Thanks a bunch for your effort.

loustler commented 8 years ago

Same .. 1.9.4 on OS X 10.11.6

display-buffer was deprecated on atom ?

what's happend

JeffShomali commented 8 years ago

Same with OS X 10.11.6

juvenal commented 8 years ago

I got the same with Atom 1.9.8 and OS X 10.11.6 too...

cgpena commented 8 years ago

On OSX 10.11.6 I made the code change suggested by @Nollikino on this file: /Users/(username)/.atom/packages/remote-edit/lib/model/remote-edit-editor.coffee and seems to be working fine so far.

marcbolh commented 8 years ago

Appreciated but I don't feel like hacking Atom, any other packages to recommend?

Do I even need a package to save to ftp?

Nollikino commented 8 years ago

@marcbolh Atom doesn't itself have native support to save files via SFTP/FTP/SCP, so if you want to remotely save files via Atom then you need a package to do so.

There are other packages that does roughly the same thing as Remote-Edit, but I don't have much or any experience from them.

You can try: remote-sync atom-sync

Otherwise your best bet is to get a separate FTP/SFTP program to transfer files to and from your hosts if you really don't want to edit some files in this package to get it to work once again.

seanpmgallagher commented 8 years ago

Cyber duck now works well with atom. It'll let you browse your FTP files, right click and edit in atom, and then from there you can save like you used to with remote-edit

On Aug 24, 2016, at 9:11 AM, Nollikino notifications@github.com wrote:

@marcbolh Atom doesn't itself have native support to save files via SFTP/FTP/SCP, so if you want to remotely save files via Atom then you need a package to do so.

There are other packages that does roughly the same thing as Remote-Edit, but I don't have much or any experience from them.

You can try: remote-sync atom-sync

Otherwise your best bet is to get a separate FTP/SFTP program to transfer files to and from your hosts if you really don't want to edit some files in this package to get it to work once again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

kwerle commented 8 years ago

We're wandering way off topic - but today I plan on implementing a docker project for mounting remote filesystems. I've used fuse-sshfs on OSX and it was unstable. My intention is to use fuse-sshfs in a docker container that links to the local fs so that it's just like remote mounting.

This will be a hack and it may perform terribly. But my hope is that it'll do the job. https://github.com/kwerle probably dockerfs.

On Wed, Aug 24, 2016 at 6:26 AM, Sean notifications@github.com wrote:

Cyber duck now works well with atom. It'll let you browse your FTP files, right click and edit in atom, and then from there you can save like you used to with remote-edit

On Aug 24, 2016, at 9:11 AM, Nollikino notifications@github.com wrote:

@marcbolh Atom doesn't itself have native support to save files via SFTP/FTP/SCP, so if you want to remotely save files via Atom then you need a package to do so.

There are other packages that does roughly the same thing as Remote-Edit, but I don't have much or any experience from them.

You can try: remote-sync atom-sync

Otherwise your best bet is to get a separate FTP/SFTP program to transfer files to and from your hosts if you really don't want to edit some files in this package to get it to work once again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sveale/remote-edit/issues/189#issuecomment-242062662, or mute the thread https://github.com/notifications/unsubscribe-auth/AABbGG86_PkXPcAuosBb6cx4O4-_Up-dks5qjEaVgaJpZM4JaRJb .

kurt@CircleW.org http://www.CircleW.org/kurt/

dmase44 commented 8 years ago

As a follow up, Nollikino's manual edit to the \packages \remote-edit\lib\model\remote-edit-editor.coffee has been working fine through several Atom updates from stable 1.9.0 thru 1.9.9. Just follow his instructions & you will be good to go.

sbrl commented 7 years ago

@Nollikino Could you make a pull request please? Then I can pull down the patch and apply it more easily.

zlodes commented 7 years ago

Same with Ubuntu 16.04

tomasnorre commented 7 years ago

Same problem Atom: 1.12.6 MacOS: 10.12.1

rudymccomb commented 7 years ago

Exact same problem still Atom 1.12.6 MacOS 10.12.2 Beta

dmytro-y-dev commented 7 years ago

Same. Linux Mint 18 "Sarah". Atom 1.12.9.

ivan82 commented 7 years ago

Edit file: ~/.atom/packages/remote-edit/lib/model/remote-edit-editor.coffee

replace line 9: DisplayBuffer = require path.resolve resourcePath, 'src', 'display-buffer' with: DisplayBuffer = TextEditor.prototype.displayBuffer

sbrl commented 7 years ago

Pull request? 

Sent from my Samsung device

-------- Original message -------- From: Ivan Jakesevic notifications@github.com Date: 20/01/2017 12:46 pm (GMT+00:00) To: sveale/remote-edit remote-edit@noreply.github.com Cc: Starbeamrainbowlabs sbrl@starbeamrainbowlabs.com, Comment comment@noreply.github.com Subject: Re: [sveale/remote-edit] Failed to activate the remote-edit package (#189)

Edit file: ~/.atom/packages/remote-edit/lib/model/remote-edit-editor.coffee replace line 9:

DisplayBuffer = require path.resolve resourcePath, 'src', 'display-buffer'

with:

DisplayBuffer = TextEditor.prototype.displayBuffer

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/sveale/remote-edit","title":"sveale/remote-edit","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/sveale/remote-edit"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ivan82 in #189: Edit file: ~/.atom/packages/remote-edit/lib/model/remote-edit-editor.coffee\r\n\r\nreplace line 9: \r\nDisplayBuffer = require path.resolve resourcePath, 'src', 'display-buffer'\r\nwith:\r\nDisplayBuffer = TextEditor.prototype.displayBuffer"}],"action":{"name":"View Issue","url":"https://github.com/sveale/remote-edit/issues/189#issuecomment-274064349"}}}

StefanObermeyer commented 7 years ago

had to change .atom\packages\remote-edit\lib\model\remote-edit-editor.coffee (line 9) as described in @Nollikino Comment commented on Aug 3, 2016

# DisplayBuffer = require path.resolve resourcePath, 'src', 'display-buffer'
DisplayBuffer = TextEditor.prototype.displayBuffer

and it works for me on Windows10...

tomasnorre commented 7 years ago

Works for me as well on macOS Sierra.