Ftps issue [MAD]

Hi,

Has anyone manged to work with the meteor-ftps package?
I cannot get it to work :scream:

as soo as I try to only declare it: var FTPS = require('ftps');
I get Error: Cannot find module 'ftps'

I have got to make it work…half of the app functionality depends on that…

tnx for any assistance!

You don’t need to require ftps if you are using the package.

Just use FTPS as though it were requireded elsewhere in scope

“FTPS” nor “ftps” is recognised in any way…
do you have any example of to use it?

I’m unfourtunately not familiar with the package and its lack of documentation is annoying.

I’ll try some stuff though :smile:

@xtrim The FTPS is only available on the server. Which is probably wise. Are you trying to use it on the client?

I’m using it on the server

http://meteorpad.com/pad/Q8T5RhnE3kXhurAuP/Leaderboard

Default meteorpad with the package added. In the startup you’ll see [Function]. Caused by a console.log of FTPS on startup.

This proves that it has been required correctly.

So things to check:

  • You’re using the same package as me zcurtis:ftps
  • The code is in a Meteor.isServer block or in a server only folder.

If its still undefined, please make a reproduction of your app that we can look at on github or similar :smiley:

1 Like

I understand my mistake now :smiley:

Thank you!

What was your mistake?(Mostly so other people can learn from reading our discussion :slight_smile: )

I tried to declare/require it (as I am used to)
I did not know that when installing the package “it is just there”.

Also I have code completion (webStorm), So it is weird that the compiler does not recognize it; so I thought “it is not working”…

Ahh, thats what I said in my first post :smiley:

If you want to understand how this works more. Look at the source of the package you are using: https://github.com/zachariahtimothy/meteor-ftps/

Specifically the Package.js and lib.js files.

In them you’ll see where the FTPS actually gets required(lib.js) and then exported back to Meteor(Package.js).

Goodluck!