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

Build Error #2185

Open
HarimbolaSantatra opened this issue Oct 29, 2024 · 1 comment
Open

Build Error #2185

HarimbolaSantatra opened this issue Oct 29, 2024 · 1 comment

Comments

@HarimbolaSantatra
Copy link

Description

Provide a brief overview of the enhancement or issue.

Steps to Reproduce

git clone --depth=1 https://github.com/openMF/web-app
cd web-app
npm install
npm run build:prod

Expected Behaviour

Artifact is build.

Actual Behaviour

Output:

> [email protected] postinstall /home/santatra/cb/web-app
> node version.js && ngcc

Wrote version info 2b730bb to web-app/src/environments/.env.ts
/home/santatra/cb/web-app/node_modules/@angular/compiler-cli/bundles/ngcc/main-ngcc.js:3
      import {createRequire as __cjsCompatRequire} from 'module';
             ^

SyntaxError: Unexpected token {
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    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)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node version.js && ngcc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Settings

  • Mifos X version: current master branch
  • Browser used: Not relevant
@R-Kri
Copy link

R-Kri commented Nov 12, 2024

issue #2185
This error is due to an outdated Node.js version, which doesn't support ES module syntax used by Angular's Ivy compiler (ngcc). To fix this issue, the project requires Node.js 14.x or higher.

Solution:

  1. Upgrade Node.js to version 14 or above
  2. Reinstall Dependencies.

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

2 participants