Closed Comver closed 1 year ago
@sand4rt How did you create the distribution file?
@cgsmith I'm using another package called ftp-deploy that is causing this error: https://github.com/simonh1000/ftp-deploy/issues/116. Let me know if you want to know more.
I'm curious how you generated the distribution file? Was this bult separately or downloaded elsewhere? Trying to test a few things locally.
You mean the dist folder? This is generated by running npm install
and after that run: npm run build
.
npm install
installs the ncc
command npm run build
runs ncc build index.js
index.js
file, i import a library called ftp-deploy
(which has a pagent.exe included)Noting is downloaded from elsewhere (only from npm through the packages.json)
This is how you can test the deployment:
npm install && npm run build
node test-action.js
const core = require('@actions/core');
const FtpDeploy = require('ftp-deploy');
core.info('Deploying...');
new FtpDeploy()
.deploy({
sftp: true,
host: 'test.rebex.net',
port: 22,
user: 'demo',
password: 'password',
remoteRoot: './',
localRoot: 'dist',
include: ['dist'],
exclude: ['node_modules/**', 'node_modules/**/.*', '.git/**']
})
.then(response => core.info('Deploy finished:', response))
.catch(error => core.error(error));
Does this still persist after v1.7?
Run sand4rt/ftp-deployer@v1.1 (node:3021) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. Deploying... /home/runner/work/_actions/sand4rt/ftp-deployer/v1.1/dist/index.js:11609 return reentry(); ^
ReferenceError: reentry is not defined at /home/runner/work/_actions/sand4rt/ftp-deployer/v1.1/dist/index.js:11609:11 at Socket. (/home/runner/work/_actions/sand4rt/ftp-deployer/v1.1/dist/index.js:11668:7)
at Object.onceWrapper (events.js:300:26)
at Socket.emit (events.js:210:5)
at TCP. (net.js:659:12)