Starts in:
2 DAYS
0 HR
17 MIN
12 SEC
Starts in:
2 D
0 H
17 M
12 S
Open Closed

Running Angular App #5319


User avatar
0
shobhit created
  • ABP Framework version: v7.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi Team, We have an existing project on v4.2.2 running on angular "@angular/cli": "~11.0.0", "@angular/compiler-cli": "~11.0.0", "@angular/language-service": "~11.0.0". Now we have setup a new developer machine which will be running the angular project on latest version of angular. We have following setup for this new developer:

1- ABP CLI: 7.2.2 2- angular CLI : 16.1.1

Questions: Do we have to generate proxy in angular project? if yes what command we can use as "abp generate-proxy" is not working for us.

Issue: When doing the project build using "yarn start" we are getting following error:

PS C:\Users\aztuteadmin\Desktop\Aztute\myProject> yarn start yarn run v1.22.19 $ ng serve --open | Generating browser application bundles (phase: building)...node:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen); ^

Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at module.exports (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\util\createHash.js:135:53) at NormalModule._initBuildHash (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:417:16) at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:452:10 at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:323:13 at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\loader-runner\lib\LoaderRunner.js:367:11 at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\loader-runner\lib\LoaderRunner.js:203:19 at VirtualFileSystemDecorator.readFile (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules@ngtools\webpack\src\virtual_file_system_decorator.js:48:13) at processResource (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\loader-runner\lib\LoaderRunner.js:202:11) at iteratePitchingLoaders (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\loader-runner\lib\LoaderRunner.js:158:10) at runLoaders (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\loader-runner\lib\LoaderRunner.js:365:2) at NormalModule.doBuild (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:295:3) at NormalModule.build (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:446:15) at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\Compilation.js:981:14 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }

Node.js v18.16.1 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


9 Answer(s)
  • User Avatar
    0
    mahmut.gundogdu created

    (in the termal, when you are located in angular app) abp generate-proxy -t ng then the proxy has been generated by cli. you can see the documentation for more information https://docs.abp.io/en/abp/latest/UI/Angular/Service-Proxies

    I don't have any information about why you got the error. Can you share your app version and package.json. Maybe I can re-produce in my local

  • User Avatar
    0
    shobhit created

    Actually, disregard my original question. We're still facing the same problem, but here is the scenario now:

    I did not install ABP. I just installed the following: Node: v14 Yarn: v1 Angular: v11

    Then I ran "yarn" and then "yarn start". This worked and I was able to launch our website locally.

    Then I upgraded Angular to v12. Then I deleted both the "package-lock.json" file and "node_modules" folder. Then I ran "yarn", and then "yarn start". This time I get the following error:


    PS C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter> yarn start yarn run v1.22.19 $ ng serve --open ⠧ Generating browser application bundles (phase: building)...node:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen); ^

    Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at BulkUpdateDecorator.hashFactory (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\util\createHash.js:145:18) at BulkUpdateDecorator.update (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\util\createHash.js:46:50) at RawSource.updateHash (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\node_modules\webpack-sources\lib\RawSource.js:77:8) at NormalModule._initBuildHash (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:880:17) at handleParseResult (C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:946:10) at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:1040:4 at C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter\node_modules\webpack\lib\NormalModule.js:819:5 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }

    Node.js v18.16.1 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

  • User Avatar
    0
    Long.Nguyen created

    Hi,

    This issue might come with Node version 17+ Could you please downgrade your current version: v18.16.1 to v16+ which is LTS ?

  • User Avatar
    0
    shobhit created

    I tried with Node V16. Then when I run "yarn start", I get the following error. I have tried solving it but searching it up but have not been successful.


    PS C:\Users\aztuteadmin\Desktop\Aztute\CommandCenter> yarn start yarn run v1.22.19 $ ng serve --open ⠋ Generating browser application bundles (phase: setup)...Warning: Entry point 'ng2-pdf-viewer' contains deep imports into 'C:/Users/aztuteadmin/Desktop/Aztute/CommandCenter/node_modules/pdfjs-dist/legacy/build/pdf', 'C:/Users/aztuteadmin/Desktop/Aztute/CommandCenter/node_modules/pdfjs-dist/legacy/web/pdf_viewer'. This is probably not a problem, but may cause the compilation of entry points to be out of order. ⠼ Generating browser application bundles (phase: building)... <--- Last few GCs --->

    [10652:0000017E9B79B6C0] 241694 ms: Scavenge (reduce) 2038.6 (2081.3) -> 2038.2 (2081.5) MB, 4.9 / 0.0 ms (average mu = 0.143, current mu = 0.008) allocation failure [10652:0000017E9B79B6C0] 244947 ms: Mark-sweep (reduce) 2038.8 (2081.5) -> 2038.4 (2082.3) MB, 3249.4 / 0.1 ms (average mu = 0.074, current mu = 0.007) allocation failure scavenge might not succeed

    FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF6338515AF v8::internal::CodeObjectRegistry::~CodeObjectRegistry+122159 2: 00007FF6337DB376 DSA_meth_get_flags+64118 3: 00007FF6337DC3F2 DSA_meth_get_flags+68338 4: 00007FF634113204 v8::Isolate::ReportExternalAllocationLimitReached+116 5: 00007FF6340FD7CD v8::SharedArrayBuffer::Externalize+781 6: 00007FF633FA0D8C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468 8: 00007FF633FAAA0A v8::internal::Heap::PageFlagsAreConsistent+2842 9: 00007FF633F9D669 v8::internal::Heap::CollectGarbage+2137 10: 00007FF633F9B820 v8::internal::Heap::AllocateExternalBackingStore+2000 11: 00007FF633FC03A6 v8::internal::Factory::NewFillerObject+214 12: 00007FF633CF29F5 v8::internal::DateCache::Weekday+1797 14: 0000017E9DF8CB6F error Command failed with exit code 134. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

  • User Avatar
    0
    Long.Nguyen created

    Hi,

    Could you please share the angular app to me ? Email: phuc.long@decisiontree.tech Thank you.

  • User Avatar
    0
    shobhit created

    Sorry, but we cannot share the app as of now. I will connect with my legal consultant and get back to you. In the meantime, do you have any ideas how to solve this issue? I've tried allocated more memory like 4 GB, 8 GB, but it's still throwing the error.

  • User Avatar
    0
    Long.Nguyen created

    Hi, Firstly, please make sure that you increase memory successfully by following the guide for correct environment: https://www.code4copy.com/angular/angular-ng-build-out-of-memory/#:~:text=To%20fix%20this%20error%20one,3%2F4th%20of%20available%20memory.

  • User Avatar
    0
    shobhit created

    I tried this and it's still not working

  • User Avatar
    0
    masum.ulu created
    Support Team Angular Expert

    Hi shobhit,

    I see the a few problem in the question, so I want to understand correctly, what's the real problem and how can I reproduce this ? Can you please tell step by step for the reach error ?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06