yongkangchen / remote-sync

Upload your files to remote host after every change. Both SCP/SFTP and FTP are supported.
https://atom.io/packages/remote-sync
MIT License
237 stars 71 forks source link

Uncaught Error: [remote-sync] invalid transport: undefined in ~/www/regress/wp-content/themes/bea... #445

Closed karevn closed 7 years ago

karevn commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.1 x64 Electron: 1.6.15 OS: Mac OS X 10.12.6 Thrown From: remote-sync package 4.1.5

Stack Trace

Uncaught Error: [remote-sync] invalid transport: undefined in /Users/karevn/www/regress/wp-content/themes/beaton/.remote-sync.json

At /Users/karevn/.atom/packages/remote-sync/lib/RemoteSync.coffee:256

Error: [remote-sync] invalid transport: undefined in /Users/karevn/www/regress/wp-content/themes/beaton/.remote-sync.json
    at RemoteSync.createTransport (/packages/remote-sync/lib/RemoteSync.coffee:256:17)
    at RemoteSync.getTransport (/packages/remote-sync/lib/RemoteSync.coffee:262:19)
    at RemoteSync.uploadFile (/packages/remote-sync/lib/RemoteSync.coffee:108:37)
    at handleEvent (/packages/remote-sync/index.coffee:46:14)
    at /packages/remote-sync/index.coffee:100:40)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:381:36)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:266:23)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1354:34)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:348:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -0:08.2.0 remote-sync:upload-file (div.line)

Non-Core Packages

atom-tabs-in-sidebar 1.1.0 
language-graphql 0.9.0 
language-javascript-jsx 0.3.7 
remote-sync 4.1.5 

The "transport" field WAS defined in my config:

{
  "transport": "ftp",
  "username": "...",
  "password": "...",
  "hostname": "...",
  "target": "...",
  "useAtomicWrites": true,
}
daverickdunn commented 7 years ago

Can't use trailing commas with JSON I'm afraid. "useAtomicWrites": true,

Error is quite misleading. Will consider adding validation of the file in future...