Unable to generate production package

I am facing difficulties in generating a production package for my application. The process of running the application itself and building a package with the 'dev' profile seems to be working fine without any issues.

However, whenever I execute ".\mvnw -Pprod package" in the project's root directory, I encounter the following error:

[INFO] [17:15:22] Starting 'inject:vendor'...
... (error logs continue)

The error message suggests that a file named .htaccess is missing from the specific location mentioned. It appears that this file was required by Gulp for the build process. Even though I never needed this file before, its absence now seems to be causing the problem after relocating the project to a different drive.

In an attempt to resolve this issue, if I manually create an empty ".htaccess" in the expected location, it triggers another error as shown below:

[INFO] [17:21:43] Finished 'inject:app' after 2.94 s
.... (more error logs displayed)

I have tried multiple solutions including deleting and cloning the repository again, as well as clearing NPM's cache based on suggestions found in certain forums. However, none of these attempts have worked so far, leaving me puzzled about what else to try.

Apologies for the detailed logs provided, but I wanted to give a comprehensive overview of the issue at hand.

If you have any insights or recommendations, kindly share them. Thank you!

Answer №1

Success! A helpful tip from Gaël Marziou set me on the right path to investigate conflicting versions of node or gulp.

After experimenting with different combinations of local and global node versions, as well as disabling gulp tasks one by one without success, I turned my attention to messing with gulp versions. This turned out to be the solution.

To resolve the issue, I made a simple adjustment in my package.json file:

    "gulp": "^3.9.1",

was changed to:

    "gulp": "3.9.1",

With this change, everything now compiles perfectly.

Thanks a lot for your assistance :)

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

Setting up a custom package installation process within a GitHub action

I've been working on incorporating private packages from GitHub into my project. Here's a snippet of my workflow: - name: Set GitHub packages registry run: | echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" & ...

"Encountering a 'Your Connection is Not Private' error while using Node

I recently purchased an SSL certificate and encountered an issue with Google Chrome. When I try to access my website, it displays the message 'Your connection is not private NET::ERR_CERT_AUTHORITY_INVALID'. Here are the steps I have taken: const ...

Issue encountered: Incompatibility between Mongoose Populate and Array.push()

After reading a different post addressing the same issue, I still couldn't figure out how to implement the solution into my own scenario. The discussion revolved around the topic of node js Array.push() not working using mongoose. In my Mongoose asyn ...

Error: Module 'node-rdkafka' not found

After successfully installing node-rdkafka on my MacBook Pro using the "npm install node-rdkafka" command, I encountered an issue while attempting to build the following node.js code in Eclipse. Within my Eclipse Node.JS application, var Kafka = require( ...

npm installation raises concerns about unmet peer dependencies despite them being already satisfied

I recently completed an upgrade to the final release of angular 2 from rc-6. Transitioning through different beta/rc versions was smooth and without any complications. My package.json dependencies include: "dependencies": { "@angular/common": "2.0.0" ...

Ignore all files in a directory except for specific file types in the .npmignore file

Context In my typescript project being published to npm, all source files are contained in the "src" folder and compiled to the "dist" folder. The assets like HTML templates, CSS files, and others are also within the "src" folder and get copied over to th ...

The page displays before all the values are sorted out

Before diving into my question, I want to clarify that I am new to nodejs and struggling with a particular issue. I believe the rendering occurs before searching for a string in files. Despite trying various solutions, I haven't been able to resolve i ...

When trying to establish Expo cli through npm install, the process gets stuck specifically during the extraction phase of

My attempt to install Expo for React Native using npm install -g expo-cli has been unsuccessful as the installation process pauses indefinitely at extract:rxjs: still extract <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a5d7d ...

What are the steps for integrating webfont NPM into your project?

//app.js const webfont = require('webfont').default; webfont({ fontName: 'mycustomfont', files: './src/*.ttf', formats: ['woff','eot'] }).then((result) => { console.log(resul ...

Is express-session failing to create a cookie?

Currently, I'm going through Ben Awad's 13-hour Fullstack React GraphQL TypeScript Tutorial and I hit a roadblock while trying to set the login cookie around the 1 hour and 50-minute mark. I believe I successfully established a connection with r ...

Troubleshooting NodeJS's access denied problem on AWS S3

Here is the bucket policy that I have set up: { "Version": "2012-10-17", "Statement": [ { "Sid": "AddCannedAcl", "Effect": "Allow", &q ...

npm encountered an error with code EPEERINVALID, indicating an issue with

Welcome, I'm a new member here and encountering an npm ERR! code EPEERINVALID. Currently, my setup includes: nvm 0.32.1 npm 2.15.9 node v4.5.0 grunt-cli v1.2.0 grunt v0.4.5 While attempting to upgrade a package or module, I came across the foll ...

Navigating - Utilizing dot-notation to reach the top-level function in Express

If we want to use express in a basic javascript file, all we need to do is add the following two lines of code at the beginning (after installing it through npm): var foo = require('express'); var app = foo(); According to the express API guide ...

Encountering an issue with running npm build? Receiving an error related to

Running npm start command [email protected] starting the application using react-scripts An issue has been detected with the project dependency tree. While this may not be a bug in Create React App, it is something that needs to be addressed locall ...

Can I safely stop a `npm install` process by using ^C?

When I say "safe," I am referring to the ability to easily fix any issues by simply running npm install again. There are instances where I suspect my installations may be broken due to interruptions in the process, but I lack concrete evidence to support t ...

Trouble with the 'uppercase' package in Node.js: Receiving ERR_REQUIRE_ESM error while utilizing the require() function

I am encountering a problem with the 'upper-case' module while developing my Node.js application. My intention is to utilize the upper-case module to convert a string to uppercase, but I'm running into difficulties involving ESM and require( ...

Sending a JWT token to a middleware with a GET request in Express Node.js - the proper way

Struggling with Js and web development, I've scoured the web for a solution to no avail... After completing a project for a small lab, my current challenge is creating a login page and generating a web token using JWT... I successfully created a use ...

The elusive 404 error strikes again as the Nginx server frantically searches for the default path 'etc/nginx/html/index.html' within the NextJS application

I've been struggling with a persistent 404 issue for days now and could really use some assistance. My system is CentOS7 (CPanel, VPS) with engintron for the nginx reverse proxy and pm2 to run my next.js application. default.conf server { listen ...

Looking for a method to transfer response.body information from an express server (server.js) to a React client (client.js)?

I'm currently working on a project that involves setting up a REST endpoint (POST) for the backend to send response data back to my React app. The goal is to construct an HTML page and then send that HTML back to the backend team. However, the challen ...

Error message: NodeJS express unknown function or method get()

Currently, I am facing an issue while working with express and Pug (Jade) to render a page as the get() function is returning as undefined along with warnings... I followed these steps: npm install express --save npm install pug --save Here's a sn ...