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!