Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simegine fails to build after npm module update on Centos 8 #161

Open
fabbione opened this issue Aug 25, 2021 · 1 comment
Open

Simegine fails to build after npm module update on Centos 8 #161

fabbione opened this issue Aug 25, 2021 · 1 comment

Comments

@fabbione
Copy link

  • npm run build

[email protected] build /root/rpmbuild/BUILD/simengine-dashboard-3.38/simengine-3.38/dashboard/frontend
vite build

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module 'worker_threads'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/root/rpmbuild/BUILD/simengine-dashboard-3.38/simengine-3.38/dashboard/frontend/node_modules/vite/dist/node/chunks/dep-98dbe93b.js:26:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: vite build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-25T16_08_09_285Z-debug.log
error: Bad exit status from /var/tmp/rpm-tmp.G4xpjJ (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.G4xpjJ (%build)
buildall: Build of simengine-dashboard.spec failed

@fabbione
Copy link
Author

According to #159, nodejs 12 or higher is required to build. In this case the rpm dependency needs to be changed:

nodejs is using epoch (1:...) and 1:10 is higher than 12 (0:12).

diff --git a/rpm/specfiles/simengine-dashboard.spec b/rpm/specfiles/simengine-dashboard.spec
index 678ef2a..f47e1db 100644
--- a/rpm/specfiles/simengine-dashboard.spec
+++ b/rpm/specfiles/simengine-dashboard.spec
@@ -9,7 +9,7 @@ License: GPLv3+

Source0: https://github.com/Seneca-CDOT/simengine/archive/%{gittag}/simengine-%{version}.tar.gz

-BuildRequires: nodejs-devel >= 12
+BuildRequires: nodejs-devel >= 1:12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant