electron-userland / electron-webpack-quick-start

A bare minimum project structure to get started developing with electron-webpack.
https://webpack.electron.build/
730 stars 258 forks source link

"Renderer: AttachConsole failed with error 6: The handle is invalid" on "yarn dev" #127

Open tiagorangel1 opened 3 months ago

tiagorangel1 commented 3 months ago

Nothing about the code changed, I used the instructions in the README

PS C:\path> yarn
yarn install v1.22.22
[1/5] Resolving packages...
[2/5] Fetching packages...
[3/5] Linking dependencies...
[4/5] Building fresh packages...
[5/5] Cleaning modules...
Done in 121.53s.

PS C:\path> yarn dev
yarn run v1.22.22
$ electron-webpack dev
┏ Renderer -------------------

  AttachConsole failed with error 6: The handle is invalid.

┗ ----------------------------
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:79:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (C:\path\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\path\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\path\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\path\node_modules\webpack\lib\NormalModule.js:503:5  
    at C:\path\node_modules\webpack\lib\NormalModule.js:358:12 
    at C:\path\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\path\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (C:\path\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\path\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\path\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\path\node_modules\graceful-fs\graceful-fs.js:115:16  
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
twilson90 commented 1 month ago

I also get something similar, using latest stable node:

> yarn dev    
yarn run v1.22.22
$ electron-webpack dev
(node:18956) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:79:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\Users\hedge\Downloads\electron-webpack-quick-start\node_modules\graceful-fs\graceful-fs.js:115:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.