Server deploy using moralis-admin-cli

Hi, when trying deploy site on server as in tutorial i encounter error:

En error occured when trying to deploy

Error: ENOENT: no such file or directory, stat '../publish.zip'
    at Object.statSync (node:fs:1141:3)
    at C:\Users\Mario\AppData\Roaming\npm\node_modules\moralis-admin-cli\commands\deploy.js:45:32
    at processTicksAndRejections (node:internal/process/task_queues:94:5) {
  errno: -4058,
  syscall: 'stat',
  code: 'ENOENT',
  path: '../publish.zip'
}
Unexpected error
Error: ENOENT: no such file or directory, unlink '../publish.zip'
    at Object.unlinkSync (node:fs:1263:3)
    at C:\Users\Mario\AppData\Roaming\npm\node_modules\moralis-admin-cli\commands\deploy.js:70:20
    at processTicksAndRejections (node:internal/process/task_queues:94:5) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: '../publish.zip'
}

any ideas :slight_smile: ?
Mario

Hey @legenuspl

Pleasy clearify what are you trying to deploy?
Cloud Code? Please provide a link on tutorial

Yomoo :man_mechanic:

STATIC website:
https://docs.moralis.io/moralis-admin-cli#deploy
moralis-admin-cli deploy

Hey, any news? _____________________

Hey @legenuspl

Sorry for the long time response.
This error means that you provided the wrong path to the file. Try to paste full path to the file:
moralis-admin-cli deploy --p C:\myDapp\

does it mean i need to pack it into zip file, like publish.zip?

@legenuspl
Please follow tutorial https://www.youtube.com/watch?v=3_5oMqcFLws

I’m not sure if you should to pack it into zip file. Does it work correctly if you try to deploy from simple folder without packing to .zip?

ENOENT: no such file or directory
Means that it can’t find the file, so try to input full path to the file instead if β€˜β€¦/’ or use cd to select path in the the terminal

so I’m in correct folder but i haven’t pack it so I will check tutorial then, thx !

1 Like