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

Error running stencil bundle on Windows/Git Bash with Node 18.15.0 (Error: digital envelope routines::unsupported) #1108

Closed
matthewvolk opened this issue May 31, 2023 · 2 comments

Comments

@matthewvolk
Copy link
Contributor

matthewvolk commented May 31, 2023

Expected behavior

Documentation (https://developer.bigcommerce.com/stencil-docs/installing-stencil-cli/installing-stencil) states Stencil CLI is compatible with Node v18.15.0.

Actual behavior

Running stencil bundle on Windows with Git Bash results in the following:

$ stencil bundle
Validating theme..
SCSS Parsing Started...
Template Parsing Started...
Language Files Parsing Started...
Building Theme Schema File..
Schema Translations Parsing Started...
Theme task Started...
ok
Schema Translations Parsing Finished
ok
Language Files Parsing Finished
ok
Theme Schema Building Finished
ok
SCSS Parsing Finished
ok
Template Parsing Finished 
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 (E: \Bigcommerce\ MeddMax+B2B+9-22-22+(3) -6.0.1+-+b26+-+3.7\ node_modules \webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (E:\Bigcommerce\MeddMax+B2B+9-22-22+(3)-6.0.1 +-+b2b+-+3.7\node_modules \webpack\lib\NormalModule.js:417:16)
    at handleParseError (E:\Bigcommerce\ MeddMax+B2B+9-22-22+(3)-6.0.1+-+b26+-+3.
7\node_modules \webpack\lib\NormalModule.js:471:10)
    at E: \Bigcommerce\ MeddMax+B2B+9-22-22+(3)-6.0.1+-+b2b+-+3.7\node_modules \web pack\lib\NormalModule.js:503:5
    at E: Bigcommerce\MeddMax+B2B+9-22-22+(3)-6.0.1+-+b2b+-+3.7\node_modules\web pack\lib\NormalModule.js: 358:12
    at E: \Bigcommerce\MeddMax+B2B+9-22-22+(3)-6.0.1+-+b2b+-+3.7\node_modules\loa der-runner\ lib\LoaderRunner. js: 373:3
    at iterateNormalLoaders (E: \Bigcommerce\ MeddMax+B2B+9-22-22+(3) -6.0.1+-+b2b+
-+3. 7\node_modules \loader-runner\lib\LoaderRunner.js:214:10)
    at Array. <anonymous> (E: \Bigcommerce\ MeddMax+B2B+9-22-22+(3) -6.0.1+-+b26+-+3
•7\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (E:\Bigcommerce\ MeddMax+B2B+9-22-22+(3)-6.0.1+-+b26+-+3.
7\node_modules \enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at E: Biqcommerce\MeddMax+B2B+9-22-22+(3)-6.0.1+-+b2b+-+3.7\ node modules\enh anced-resolve\lib\CachedInputFileSystem.js:91:9
    at E: \Bigcommerce\MeddMax+B2B+9-22-22+(3)-6.0.1+-+b2b+-+3.7\node_modules\gra ceful-fs\graceful-fs.js:123:16
    at FReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file context :68:3) {
  openssIErrorStack: [ 'error:03000086:digital envelope routines: :initialization error'
], 
    library: 'digital envelope routines',
    reasons: 'unsupported', 
    code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node. js v18.15.0 
worker terminated

Workarounds

Downgrade to Node v16.x.x

Steps to reproduce behavior

Run stencil bundle on Windows with Git Bash using Node 18.15.0

Environment

Stencil-cli version stencil --version:
Unsure - problem reported in BigCommerce Discord, waiting on community member to get back to me with stencil version.

Node version node -v:
18.15.0

NPM version npm -v:
9.5.0

OS:
Windows (Git Bash)

@jairo-bc
Copy link
Contributor

Hi @matthewvolk, looking at the stack trace, I assume your theme is running on webpack 4, which is not supporting Node 18. You would need to update webpack from 4 to 5 and related to it packages to get your theme running on Node 18.
I would recommend going through Cornerstone PR to see which packages were update there.

@matthewvolk
Copy link
Contributor Author

Thanks @jairo-bc! I talked to the community member and they mentioned your suggestion of walking through the changes in the Cornerstone PR helped to resolve their issue.

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