droppyjs / droppy

Self-hosted file storage
BSD 2-Clause "Simplified" License
104 stars 12 forks source link

Missing dependencies #20

Closed Tronic closed 3 years ago

Tronic commented 3 years ago

On Debian:

yarn global add --dev @droppyjs/cli
(...)
droppy start

           .:.
    :::  .:::::.   @droppyjs/server 0.0.4 running on node 12.21.0
  ..:::..  :::     config at /root/.droppy/config
   ':::'   :::     files at /root/.droppy/files
     '

2021-05-07 12:31:02 [INFO] Configuration: { listeners: [ { host: [ '127.0.0.1', '::1' ], port: 8989, protocol: 'http' } ], public: false, timestamps: true, linkLength: 5, linkExtensions: false, logLevel: 2, maxFileSize: 0, updateInterval: 1000, pollingInterval: 0, keepAlive: 20000, uploadTimeout: 604800000, allowFrame: false, readOnly: false, ignorePatterns: [], watch: true, headers: {}}
2021-05-07 12:31:02 [INFO] Loading resources ...
2021-05-07 12:31:02 [INFO] ENOENT /root/.droppy/cache/cache.json, building cache ...
2021-05-07 12:31:02 [INFO] Loading resources done
2021-05-07 12:31:02 [ERROR] Missing devDependencies to compile resource cache, please reinstall or run `npm install --only=dev` inside the project directory
    at compile (/usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:253:15)
    at ReadFileContext.callback (/usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:179:14)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13)

After manually installing autoprefixer (the cause of this error is that missing), I get another error about file-extension. Am I doing something wrong or is the packaging broken?

Tronic commented 3 years ago

The second error, not fixed even with file-extension installed globally:

2021-05-07 13:27:49 [ERROR] ENOENT: no such file or directory, open 'node_modules/file-extension/file-extension.js'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at /usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:407:19
    at Array.forEach (<anonymous>)
    at Object.resources.compileJS (/usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:403:22)
    at compileAll (/usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:461:38)
    at compile (/usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:259:21)
    at ReadFileContext.callback (/usr/local/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/resources.js:179:14)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:261:13)
markhughes commented 3 years ago

Thanks, really strange. I'll work out why this has happened and get back to you!

Tronic commented 3 years ago

FWIW, I got this working by installing Droppy non-globally and installing the missing packages on the same folder.

markhughes commented 3 years ago

Hi @Tronic could you try it again in the latest version I just put out?

https://github.com/droppyjs/droppy/releases/tag/v0.0.5

markhughes commented 3 years ago

Confirmed on my end. We've added the dependency into the server, dependencies are slowly being better dealt with. Thanks agian.

Tronic commented 3 years ago

Thanks, I'll give it a try on Monday :)