creativetimofficial / ct-vite-soft-ui-dashboard-pro

Vite Soft UI Dashboard PRO by Creative Tim
https://www.creative-tim.com/product/vite-soft-ui-dashboard-pro
4 stars 0 forks source link

[Bug] Error on `npm run serve` #6

Open bgurvich opened 2 years ago

bgurvich commented 2 years ago

Version

3.0.0

Reproduction link

http://localhost

Operating System

Ubuntu 22.04

Device

VBox

Browser & Version

none

Steps to reproduce

npm install npm run serve

What is expected?

successfull dev run

What is actually happening?

$ npm run serve

> vue-soft-ui-dashboard-pro@3.0.0 serve
> vue-cli-service serve

 INFO  Starting development server...
10% building 2/5 modules 3 active ...t-loader/index.js??ref--14-0!/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/src/main.jsError: 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 (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/util/createHash.js:135:53)                                                                                                at NormalModule._initBuildHash (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:471:10)                                                                                                 at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:358:12                                                                                                                    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:373:3                                                                                                               at iterateNormalLoaders (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:236:3                                                                                                               at runSyncOrAsync (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:130:11)                                                                                             at iterateNormalLoaders (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9                                                                                                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 (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/util/createHash.js:135:53)                                                                                                at NormalModule._initBuildHash (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:471:10)                                                                                                 at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:503:5                                                                                                                     at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/webpack/lib/NormalModule.js:358:12                                                                                                                    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:373:3                                                                                                               at iterateNormalLoaders (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9                                                                                                    at /home/moshe/vue-soft-ui-dashboard-pro-v3.0.0/node_modules/graceful-fs/graceful-fs.js:123:16                                                                                                                     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {                                                                                                                  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],                                                                                                                           library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.8.0

Solution

Additional comments

bgurvich commented 2 years ago

looks like was able to fix with:

export NODE_OPTIONS=--openssl-legacy-provider