When attempting to execute the "npm run prod" command, the terminal displays the error message "error:03000086:digital envelope routines::initialization error."

In my current project, which combines vue and laravel, I encountered an issue when trying to run the production command:

npm run prod

The error message that appeared was:

opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.9.1

After searching on Google for a solution, I added the following lines to the scripts section of the package.json file:

"serve": "vue-cli-service --openssl-legacy-provider serve",
"build": "vue-cli-service --openssl-legacy-provider build",
"lint": "vue-cli-service --openssl-legacy-provider lint"

Unfortunately, this did not resolve the issue. Can someone provide guidance on how to fix this problem?

For reference, here is my updated package.json file:

Answer №1

After updating my nodeJs, I came across this issue.

Fortunately, I managed to resolve it using a solution similar to what was suggested in the original question.

Since I am working on a Laravel/VueJs project, I had to execute npm run hot to serve the project in development mode.

To ensure everything ran smoothly, I included

NODE_OPTIONS=--openssl-legacy-provider
in both the hot and prod scripts within package.json.

Thankfully, this fixed the problem for me. Sharing this information here in case it proves helpful to someone else.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Automatically generate Handlebars templates using Node.js Express.js from the views/static directory

I have come up with a way to automatically load my handlebar templates from the views/static folder without manually setting up a route for each page. app.get("/:template", function(req,res){ var template = req.params.template; // Do you think this i ...

When it comes to Node.js and npm, which term is more suitable: "package" or "module"?

I'm feeling a bit puzzled - is `npm` considered a package manager, while `Node.js` uses modules? When installing or creating your own... umm, module or package? How do you decide which term to use and when? ...

What is the method for shifting content as the window is resized to ensure it remains in its original position?

My page features a grid with three div elements. Each div is the size of the viewport, resulting in only one div being visible at a time, while the other two remain outside the view. This makes the grid three times larger than the viewport. When resizing ...

Ways to identify whether a day is in Pacific Standard Time (PST) or Pacific Daylight

While working on setting a date in node js for my server located in IST, I am trying to figure out whether the date would fall under PDT or PST time (depending on Daylight Saving Time being on or off). If my server was in PST/PDT time zone, this decision ...

I'm experiencing some difficulties utilizing the return value from a function in Typescript

I am looking for a way to iterate through an array to check if a node has child nodes and whether it is compatible with the user's role. My initial idea was to use "for (let entry of someArray)" to access each node value in the array. However, the "s ...

Storing Data Efficiently in AngularJS and NodeJS: Choosing Between Saving to a JSON File or a Database

I am a beginner in AngularJS and nodeJS, struggling to find the information I need. I am working on a small app as a training exercise - a personal lexicon where users can store and refer back to information they want to keep handy. My challenge lies in t ...

Maintain a consistent header height with CSS even when using the calc() function

--dis: calc(var(--max-height) - var(--min-height)); /* @media large{--min-height:13rem}; @media small{--min-height:6.5rem}; --max-height:75vh; */ --percent: calc(var(--scroll-ani) / var(--dis)); /* in js: document.body.style = "--scroll-ani: ...

Is Three.js deprecating the setHSL() function?

Searching for a solution to incorporate an HSL color scheme into my threejs project. The documentation seems to lack information on using .setHSL() or .offsetHSL() post-2013. Is there a preferred method to exclusively utilize HSL in a threejs scene? Appre ...

Unlock the power of TypeScript's inheritance by utilizing static methods for type

In my TypeScript project, I have two classes: BaseModel and HotelModel. The HotelModel extends the BaseModel class, which provides static methods like findById, all, etc. export default class BaseModel { private collection:string _id:string | undefine ...

Activate the submit button using jQuery

I have tested the code snippet that I shared on fiddle. I am looking to activate the save button by hitting the enter key, which will submit the form using ajax. The activation should occur when there is text content greater than 0 in the span. $(docum ...

How to selectively display specific columns when outputting JSON to a dynamic HTML table?

I'm looking to output specific JSON data in an HTML table with JavaScript. The headers will remain the same, but the JSON content will vary. Currently, I have a working function that generates the entire table using JavaScript: <body> ...

Encountering a 'npm Error EEXIST' while attempting to install babel-preset-es2015 on Windows 10 operating

Encountered an error while attempting to install babel-preset-es2015 using npm on a Windows 10 machine. (node:8392) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please make sure it is updated to a newe ...

Tips for displaying an edit action icon when hovering over specific text

Looking for a way to display or hide the edit icon when hovering over specific text? Take a look at this snippet of HTML code: <ul> <li> <a id="pop" href="javascript:;;" data-content="test Desc" data-id="123"> &l ...

What is the best way to eliminate products that have already been utilized?

Take a look at my code snippet. $(function() { $("#tags input").on({ focusout: function() { var txt = this.value.replace(/[^a-z0-9\+\-\.\#]/ig, ''); // only allow certain characters if (txt) $("<span/& ...

Executing an ajax request following validation

I am facing an issue with my ajax insert script and validation script. Currently, the insert script is executing regardless of the validation result. How can I modify my code to ensure that the insert query only runs after successful validation? Below is ...

Creating image galleries with HTML and Javascript loop through the drawImage function to display multiple

I'm currently working on developing a card game using HTML5 canvas, and I've come across an issue with the drawImage function when used inside a loop. It seems like there might be a problem related to closures, but I'm not entirely sure how ...

Unable to retrieve property from NextRequest

Currently, I am attempting to utilize MiddleWare in conjunction with Next.js's Middleware and JWT. Upon logging cookies and the typeof cookies variable, this is what I see on my console: { token: 'token='myToken'; Path=/' } obj ...

Does the functionality of JSON.parse include recursion?

After receiving a JSON string in response, I parse it as follows: ring = JSON.parse(response); However, although ring becomes an object, the property ring.stones is only a string when it should also be an object. To address this issue, if I execute: ri ...

What is the best way to connect CodeIgniter with Angular.js?

Are you facing challenges while integrating Angular.js and CodeIgniter? In my main.js, I'm utilizing ngRoute to define routes as follows: $locationProvider.html5Mode(true); $routeProvider.when('/test', { templateUrl: 'partials/te ...

Trouble Ensuring D3.js Tree Shaking Properly Without Rollup, Despite sideEffects Flag Being False?

After using rollup v3 to bundle my npm project that incorporates the D3.js v7 library into an es6 module for browser usage, I encountered a problem with excessive unnecessary code from D3.js in the resulting bundle. This issue persisted despite setting the ...