Vaadin 14 build frontend fails due webpack error

110 views Asked by At

I am developing a Vaadin Webapp and did not change anything like maven or Java version. Can somebody help me here? Previously it was working like a charm. When i want to build the App via maven i get this error on the task mvn vaadin:build-frontend:

    [INFO] Scanning classes to find frontend configurations and dependencies...
    [INFO] Visited 1414 classes. Took 1380 ms.
    [INFO] Visited 118 classes. Took 63 ms.
    [INFO] Skipping `npm install` because the frontend packages are already installed in the folder 'C:\Code\Intellij2\project\App\node_modules' and the hash in the file 'C:\Code\Intellij2\project\App\node_modules\.vaadin\vaadin.json' is the same as in 'package.json'
    [INFO] Copying frontend resources from jar files ...
    [INFO] Visited 201 resources. Took 184 ms.
    [INFO] Running webpack ...
    node:internal/crypto/hash:68
      this[kHandle] = new _Hash(algorithm, xofLen);
                      ^
    
    Error: error:0308010C:digital envelope routines::unsupported
        at new Hash (node:internal/crypto/hash:68:19)
        at Object.createHash (node:crypto:138:10)
        at module.exports (C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\webpack\lib\util\createHash.js:135:53)
        at NormalModule._initBuildHash (C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\webpack\lib\NormalModule.js:417:16)
        at C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\webpack\lib\NormalModule.js:452:10
        at C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\webpack\lib\NormalModule.js:323:13
        at C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\loader-runner\lib\LoaderRunner.js:367:11
        at C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\loader-runner\lib\LoaderRunner.js:233:18
        at context.callback (C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
        at C:\Code\Intellij2\ECG-WL\ECG-Worklist-App\node_modules\babel-loader\lib\index.js:44:103 {
      opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
      library: 'digital envelope routines',
      reason: 'unsupported',
      code: 'ERR_OSSL_EVP_UNSUPPORTED'
    }
    
    Node.js v20.9.0
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
1

There are 1 answers

0
Stimpson Cat On

The reason for this issue was that i tried the newer versions of Vaadin. Then i found out that vaadin creates a hidden folder in the user folder, where it downloads the node stuff. There have been never Node versions. I deleted the contents of the folder, because this issue does not show up in Node versions 16 and below.