Comments (5)
And for the continued mystery that is software...
Before I "successfully" executed npm start
, I encountered the following "known" (to me?) error:
node:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:133:10)
at module.exports (C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array. (C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\loader-runner\lib\LoaderRunner.js:205:4) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
I've run into this before trying to run tutorials based on older versions of Nodejs. The fix that I employed previously and used again was to set an environment variable, export NODE_OPTIONS=--openssl-legacy-provider
.
When I added this environment variable to my WebStorm build configuration, everything worked again. I suspect it would work in WebStorm from the terminal if I set this variable also.
With apologies to the writers of the movie, "Clue," and probably others, perhaps "'callback already called' is just a red herring."
from fable-getting-started.
Tried simply running the development version with npm start
. This, much to my surprise, seems to work. :(
from fable-getting-started.
After my "success" running npm start
, I went back to my yarn
branch, deleted the node_modules
directory, ran yarn install
.
When I now run yarn run build
, everything seems to work.
A mystery of software. Not very satisfying, but lessens my immediate need for help.
from fable-getting-started.
And I'm sure you will hate me. ;)
After successfully running and changing the message from the Git Bash shell as I previously described, I tried opening the fable-getting-started
directory with WebStorm.
WebStorm appeared to successfully load the project; however, when I run npm build
from their npm
tool window, I see the "callback already called" error again:
C:\Users\larry.jones\AppData\Roaming\npm\yarn.cmd run build
yarn run v1.22.19
$ webpack
fable-compiler 2.13.0
fable: Compiled src\App.fsproj
C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\loader-runner\lib\LoaderRunner.js:106
throw new Error("callback(): The callback was already called.");
^
Error: callback(): The callback was already called.
at context.callback (C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\loader-runner\lib\LoaderRunner.js:106:10)
at C:\Users\larry.jones\professional\projects\the-elmish-book\fable-getting-started\node_modules\fable-loader\index.js:147:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.4.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Process finished with exit code 1
FYI. I see the same error running npm run build
in the Terminal window hosted by WebStorm.
Additionally, I did just verify that the terminal I have configured for WebStorm is C:\Program Files\Git\bin\bash.exe
.
from fable-getting-started.
I was just going through The Elmish Book too (on a Mac) and encountered the same error you saw in LoadRunner.js.
I dug around and found this Stack Overflow post: https://stackoverflow.com/questions/66028314/error-node-modules-callback-was-already-called
I ended up doing
npm install -g npm-check-updates
ncu -u
npm install
And it gave me a new error:
fable-compiler 2.13.0
asset main.js 877 bytes [emitted] (name: main)
./src/App.fsproj 39 bytes [built] [code generated] [1 error]
ERROR in ./src/App.fsproj
Module build failed (from ./node_modules/fable-loader/index.js):
Error: The specified file name or path is too long, or a component of the specified path is too long.
at /Users/allenussher/Development/fsharp/elmish-book/fable-getting-started/node_modules/fable-loader/index.js:98:22
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Which apparently affects only Apple silicon... I then dug into that issue and found an issue on Fable's github: fable-compiler/Fable#3239
Apparently fable-loader isn't used anymore, so I ended up following the instructions here to create a new Fable project from scratch: https://fable.io/docs/2-steps/your-first-fable-project.html
I figured I could just copy-paste the code from The Elmish Book into it.
Well, I eventually ran into yet another problem when I run npm start
(same one encountered above):
Watching src
node:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
...
I also did the export NODE_OPTIONS=--openssl-legacy-provider
thing and then that finally fixed it.
from fable-getting-started.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fable-getting-started.