droppyjs / droppy

Self-hosted file storage
https://droppyjs.com
BSD 2-Clause "Simplified" License
109 stars 13 forks source link

process.env.DROPPY_CACHE_PATH ?? #58

Closed DerTobi75 closed 2 years ago

DerTobi75 commented 2 years ago

Installed the newest Version and got this Error, when I try to start Droppy:

tobias@hpserver:~$ sudo droppy start
/usr/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/services/resources.js:19
const cachePath = process.env.DROPPY_CACHE_PATH ?? path.join(paths.homedir, "/.droppy/cache/cache.json");
                                                 ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib/node_modules/@droppyjs/cli/node_modules/@droppyjs/server/lib/index.js:10:21)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
markhughes commented 2 years ago

@DerTobi75 what is your node version? Can you run sudo node --version ?

DerTobi75 commented 2 years ago

My node version is: v12.22.10

markhughes commented 2 years ago

@DerTobi75 could you please use at a minimum node 14? Node 16 is an option too.

Node 12 does not support some of the syntax in the project. :(