-
Notifications
You must be signed in to change notification settings - Fork 11
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
SPFx 1.18 failed to serve - error:0308010C:digital envelope routines::unsupported #110
Comments
I have the same problem. In a HelloWorld example I left only an empty div (without scss) and sill I got an error: [10:52:23] [fast-serve] To load your scripts, use this query string: ?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js ERROR in chunk hello-world-web-part [entry] Dependecies: gulpfile.js build.addSuppression( fast-server/config.json: { fast-server/webpack.extend.js const path = require('path'); package.json -> from template + "spfx-fast-server-helpers": "^1.18.0" Thanks in advance for investigating! |
Thank you for reporting. I have some ideas how to fix it, most likely will publish a fix tomorrow. |
Just wanted to chime in and say I have the same issue. Upgraded to SPFx 1.18.0, Node 18.17.1, and SPFx Fast Serve Helpers 1.18.0. Gulp serve works fine but npm run serve does not. Here's my terminal log after running the command
|
|
@s-KaiNet Thanks for fixing the issue. It is working fine for me now after the update. |
Thanks, will close the issue for now, if anybody still see this error, please feel free to reopen. |
@s-KaiNet I can open a new issue is needed , but I am getting the same error, but only in node v18, fast-serve works fine in node 16. I upgraded my project from 1.17.4 to 1.18.2, then I updated fast serve helpers to 1.18.4, and when I run fast serve on node 16, all is well, but if I run on node 18, I get the error mentioned above. More details below: node versions: 16.13.2 (works), 18.17.1 (does not work) 18.19.0 (does not work) The error is referencing places where I am using require() to load an asset, such as an image that resides in the assets folder within the web part. from node_modules in my project I've also tried 1.18.7 of spfx-fast-serve-helpers and get the same error when on node 18. If there are any other details or screenshots I can provide, let me know. |
@c-eiser13 do you still experience this issue? |
That's strange, because that exactly what I'm doing inside fast-serve in order to unlock node 18. I have a feeling that something wrong with your dependencies and you somehow install the old version of fast-serve. Have you tried deleting node_modules and package.json and reinstalling dependencies? |
@s-KaiNet yes, I deleted node_modules and pnpm-lock.yaml many times, trying different versions of spfx-fast-serve-helpers. Could be something related to environment variables, I also tried this inside the glupfile, which did not work: The only way it would work is if I manually ran that set command before running serve, or once I figured I could use that set command in the serve command within package.json. If you have any suggestions I could check further to see if it is something on my end, I'd be happy to. I'm currently running 1.18.4 of the -helpers. |
Could you tell me what is your OS? |
@s-KaiNet sorry, I'm on Windows 11 Pro |
@c-eiser13 I'm also on W11 Pro, just out of curiosity, if you have time, could you clone this repository and try to run advanced sample. You just need to Could you also tell me the command line tool you use for running |
@s-KaiNet I am running Cmder and using NVM for node. I cloned the repo, installed deps and the project runs successfully. I even added a line in scss to load an image file from an assets folder using url() and it still runs correctly. I went back and re-traced my steps and when I upgraded my project to 1.18.2, I did so on a fork, but thought I was on node 16. I still had the fork so went and was able to run serve command on node 18 without the set NODE_OPTIONS line. It is something on my end on my main project, if you have any other suggestions of where I can look, I will do so, otherwise using set in the serve command in package.json has me unblocked on node 18 for now. Appreciate your assistance! |
@c-eiser13 maybe somehow the old version of |
@s-KaiNet seems to be an issue with pnpm, if I install dependencies with npm, it runs fine. When I run npm list spfx-fast-serve-helpers, I get some errors regarding @pnp/spfx-controls-react and @pnp/spfx-property-controls requesting version 1.18.3 of spfx-fast-serve-helpers, but I also see these errors in my working fork, so not sure that is the root cause. I'm going to continue using the set command in my serve cmd in package.json until I have some more time to troubleshoot further. Appreciate all the feedback. |
npm run serve command with node 18.17.1 for SPFx 1.18 throws below errors where as it works perfectly fine with Node v16
`ERROR in ./src/webparts/listView/components/ListView.module.scss (./node_modules/spfx-css-modules-typescript-loader!./node_modules/spfx-fast-serve-helpers/node_modules/css-loader/dist/cjs.js??ref--8-2!./node_modules/spfx-fast-serve-helpers/node_modules/postcss-loader/dist/cjs.js??ref--8-3!./node_modules/clean-css-loader/lib??ref--8-4!./node_modules/sass-loader/dist/cjs.js??ref--8-5!./src/webparts/listView/components/ListView.module.scss)
Module build failed (from ./node_modules/spfx-fast-serve-helpers/node_modules/css-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
at D:\Learning\listView\src\webparts\listView\components\ListView.module.scss:1:1
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at getHashDigest (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\loader-utils\lib\getHashDigest.js:46:34)
at D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\loader-utils\lib\interpolateName.js:113:11
at String.replace ()
at interpolateName (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\loader-utils\lib\interpolateName.js:110:8)
at defaultGetLocalIdent (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\css-loader\dist\utils.js:208:43)
at generateScopedName (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\css-loader\dist\utils.js:432:24)
at exportScopedName (D:\Learning\listView\node_modules\postcss-modules-scope\src\index.js:95:28)
at localizeNode (D:\Learning\listView\node_modules\postcss-modules-scope\src\index.js:124:22)
at Array.map ()
at Selector.map (D:\Learning\listView\node_modules\postcss-selector-parser\dist\selectors\container.js:269:23)
at localizeNode (D:\Learning\listView\node_modules\postcss-modules-scope\src\index.js:120:31)
at traverseNode (D:\Learning\listView\node_modules\postcss-modules-scope\src\index.js:152:32)
at Selector.each (D:\Learning\listView\node_modules\postcss-selector-parser\dist\selectors\container.js:159:16)
at traverseNode (D:\Learning\listView\node_modules\postcss-modules-scope\src\index.js:175:18)
ERROR in ./src/webparts/listView/assets/welcome-light.png
Module build failed (from ./node_modules/spfx-fast-serve-helpers/node_modules/file-loader/dist/cjs.js):
de_modules\loader-utils\lib\interpolateName.js:110:8)
at Object.loader (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\file-loader\dist\index.js:29:48)
ERROR in ./src/webparts/listView/assets/welcome-dark.png
Module build failed (from ./node_modules/spfx-fast-serve-helpers/node_modules/file-loader/dist/cjs.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at getHashDigest (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\loader-utils\lib\getHashDigest.js:46:34)
at D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\loader-utils\lib\interpolateName.js:113:11
at String.replace ()
at interpolateName (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\loader-utils\lib\interpolateName.js:110:8)
at Object.loader (D:\Learning\listView\node_modules\spfx-fast-serve-helpers\node_modules\file-loader\dist\index.js:29:48)
ERROR in chunk list-view-web-part [entry]
list-view-web-part.js
D:\Learning\listView\node_modules@microsoft\load-themed-styles\lib\index.js
error:0308010C:digital envelope routines::unsupported`
The text was updated successfully, but these errors were encountered: