Code Monkey home page Code Monkey logo

Comments (1)

CharlemagneLasse avatar CharlemagneLasse commented on June 2, 2024

No, this software only works correctly with nodejs 13 - so even with 14, the migration of databases fails (but the rest seems to work fine). Yes, nodejs 13 is completely unsupported. And it also needs python2 (for dependencies) - which is also completely unsupported since 2020. And the dependencies which this tool uses have numerous known security vulnerabilities. So it basically a no go to install this thing in any production environment nowadays. Which is rather bad because the actual software does a lot of things right (and simple).

@vpp are there any plans to get the dependency stuff fixed and migrate to any supported nodejs version? At the moment, only nodejs 18 and 20 are actively supported by nodejs upstream. 16 still receives minimal (maintenance) support.
For python, you would need at least support for python3.11 (and everything lower than 3.7 is completely unsupported).

One of the bigger problems I see at the moment is sequelize(-cli). It has a lot of the weird dependencies (holding everything back) but which also changed the API in the most recent versions.

But if you want to migrate a already existing installation to a new nodejs version (to nodejs 18.x) then it is enough to remove package-lock.json and apply following change

diff --git a/package.json b/package.json
index 9f60e39..6462109 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
     "sequelize": "^3.19.2",
     "sequelize-cli": "2.5.1",
     "serve-favicon": "^2.1.7",
-    "sqlite3": "^4.0.1",
+    "sqlite3": "^5.1.5",
     "underscore": "^1.8.3",
     "uuid": "^3.3.2",
     "validator": "^3.43.0"
@@ -46,7 +46,7 @@
   "devDependencies": {
     "chai": "^2.2.0",
     "mocha": "^6.2.2",
-    "node-sass": "^4.5.3",
+    "node-sass": "^7.0.3",
     "request-promise": "^4.2.2",
     "selenium-webdriver": "2.53.3"
   },
@@ -59,6 +59,6 @@
     "preinstall": "npx npm-force-resolutions"
   },
   "resolutions": {
-    "graceful-fs": "^4.2.4"
+    "graceful-fs": "4.2.4"
   }
 }

and run:

rm -rf node_modules
npm install

Most of the things will work fine but the npm run-script db-update will fail in the future due to weird dependencies:

> [email protected] db-update
> node node_modules/.bin/sequelize db:migrate --config=config/db.json --models-path=lib/model/db/


Sequelize [Node: 18.13.0, CLI: 2.5.1, ORM: 3.35.1, sqlite3: ^5.1.5]

fs.js:42
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:42:5
    at req_ (/srv/timeoff-management/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/srv/timeoff-management/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/srv/timeoff-management/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)

from timeoff-management-application.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.