There seems to be an issue with the vue-cli when attempting to build in

Within my project files, there is a .env file present

-public
-src
-.env.development.local

In the package.json file, it contains:

{
    "name": "my-website",
    "version": "0.1.0",
    "scripts": {
      "serve": "vue-cli-service serve",
      "build": "vue-cli-service build --mode development",
      "lint": "vue-cli-service lint"
    }
  }

The initial run of npm run build is successful.

However, subsequent runs result in an error:

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f99480d48e9c9b8a908d9cb9c9d7c8d7c9">[email protected]</a> build: `vue-cli-service build --mode development`

Upon further investigation within the logs,

13 verbose stack Error: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c2afbbefb5a7a0b1abb6a782f2ecf3ecf2">[email protected]</a> build: `vue-cli-service build --mode development`
13 verbose stack Exit status 1

Strangely enough, deleting the public folder resolves the issue

Answer №1

It would be beneficial to have additional log output for further clarification.

If the error persists, you may find assistance by visiting: https://github.com/vuejs/vue-cli/issues/3420

You could also attempt removing your package-lock file and reinstalling npm i to resolve the issue.

Answer №2

By changing the outputDir value from public to build, the issue was resolved successfully.

Here is the updated vue.config.js file:

module.exports = {
  outputDir : 'build',
}

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

Filter a nested array in AngularJS and retrieve the parent object as the result

I've recently started experimenting with AngularJS to create checkbox filters for my wine store. Here is an example of an item in my store: { "id": 17, "name": "Ermelinda Freitas Reserva", "tag_ids": [40, 12, 56, 6, 60], " ...

Can someone please help troubleshoot my ajax code?

My ajax function is calling a php page, but I keep encountering an issue where the error function is being triggered instead of the success function. What could be causing this unexpected behavior? Here is my ajax code: function register() { $.ajax({ ...

Unable to process despite clicking button (no error messages)

I'm in the process of setting up an options page for my very first extension. As a beginner in coding, I might have made some rookie mistakes along the way. However, I am facing challenges with basic functionality that was previously working seamlessl ...

Continuously update the content within a paragraph using jQuery

After searching for a jQuery animation that would constantly change text within a paragraph, I stumbled upon a solution at this link : Text changing with animation jquery. However, I encountered a challenge as I wanted to include a bootstrap button beneath ...

Animate.css does not function properly when loaded locally

I'm currently using a Flask server to host an HTML file for testing purposes. Within the head of this HTML file, I have linked to a locally stored animate.min.css file (<link rel="stylesheet" type="text/css" href="{{ url_fo ...

Learn the process of copying and pasting a file in PhoneGap with the help of JavaScript

I am currently working on a mobile application using the phoneGap framework. I have placed my existing .db file in the www directory of phoneGap. I need to copy this file from the www directory to the internal memory of the application at /data/data/applic ...

Encountering an 'Undefined' error when trying to access data object values within the map function in a

// I keep encountering undefined values when trying to access object values from my data map // ../data/section1 const products = [{ id: 1, image: './images/homepage/xbox-games.png', text: 'Buy Xbox games and consoles', }, ...

When you tap on the screen, the keyboard disappears and you have to hold

I have encountered an issue in my web view where I am programmatically creating an input field element using JavaScript and setting focus to it after creation. The problem is that the keyboard pops up for a split second and then closes when trying to focus ...

What's the advantage in using 2 functions instead of just utilizing one?

When I'm asking for help with my code, I make sure to include all of it in case there's a connection between the different functions. Recently, I received assistance to get one of my functions working properly. Specifically, I'm looking at t ...

Accessing the 'comment' property within the .then() function is not possible if it is undefined

Why does obj[i] become undefined inside the .then() function? obj = [{'id': 1, 'name': 'john', 'age': '22', 'group': 'grA'}, {'id': 2, 'name': 'mike', &apo ...

Script for tracking user activity on Facebook and Google platforms

I currently have Google tracking conversion set up, but now I also need to implement Facebook pixel tracking. My existing Google Head Script code is as follows: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||fu ...

A guide on updating div IDs using jQuery sortable when an element is moved by the user

My goal is to use jQuery sortable to allow users to rearrange elements on a page by dragging and dropping them. Each div element has a unique ID, and when the user swaps elements, I want to update the IDs accordingly and alert the new order so it can be sa ...

How to choose the desired day within a specific month when creating a calendar from scratch?

Hi there! I need some assistance. I'm currently working on enhancing a calendar by adding an extra feature. The idea is that when the user selects one or more days, those specific day(s) should be highlighted. However, I'm facing an issue where s ...

How can we leverage Shared and Core modules alongside Feature modules in Angular development?

When developing my Angular application, I have adopted a specific architecture approach and included a shared.module.ts file in the shared folder. While leveraging lazy-loading in my app, I find myself puzzled about the necessary imports, declarations, and ...

Nodemailer is functioning properly in a local environment, however, it is encountering issues when

I am facing an issue with Nodemailer where it is sending emails successfully on my local machine but not on Lambda. I have tried various solutions from Stack Overflow, but none of them seem to be working for me. One suggestion was to make the sendEmail fun ...

Issue encountered: Unable to locate the file "SignInScreen" within the directory "./src/screens/authScreens" as referenced in the file "App.js"

App.js: import { StyleSheet, Text, View, StatusBar } from "react-native"; import { colors, parameters } from "./src/global/styles"; import SignInScreen from "./src/screens/authScreens/SignInScreen"; export default function A ...

retrieving data from a node and embedding it into an HTML file

In my project, I have an index.html file and an app.js nodejs file. Within the app.js file, there is a variable named "name" that I would like to display in my index.html page. Here is the code snippet: var name = "Utsav"; var HTTP = require('HTTP&a ...

When executed on the node REPL, lodash.sortBy will update the lodash value

When I access the node REPL, the following happens: > _ = require('lodash'); > // it displays the whole lodash object > _.sortBy(['1234', '123'], function (element) { return element.length; }); > [ '123&apos ...

The JavaScript confirm function will provide a false return value

Is it necessary to display a confirmation message asking "Are you sure ..."? I have implemented the message, but the function return false; is not working when the user clicks NO. <script> function confirmDelete(){ var answer = confirm("Are you su ...

Using Bootstrap, jQuery, and PHP to dynamically load input fields in a modal window

I am looking to dynamically load input fields in a modal window using PHP. While researching, I came across suggestions to utilize AJAX for this purpose. However, I have limited knowledge about AJAX. The plan is as follows: 1) When the user clicks on the ...