Encountering an error while setting up a Vue app in WebStorm on a Mac. npm is throwing

I'm currently in the process of setting up a Vue App using WebStorm on my Mac. However, when I try to run the npm run dev command, I encounter the following error:

npm ERR! missing script: dev

Below is a snippet from my package.json file:

"version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "vue": "^2.5.16"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.0.0-beta.15",
    "@vue/cli-plugin-eslint": "^3.0.0-beta.15",
    "@vue/cli-service": "^3.0.0-beta.15",
    "vue-template-compiler": "^2.5.16"
  },

Answer №1

It seems that the reason for this issue is the absence of a dev script in your package.json. You should instead use the npm run serve command. Here are the available scripts listed in the package.json file:

package.json

// ...
"scripts": {
    "serve": "vue-cli-service serve", // npm run serve
    "build": "vue-cli-service build", // npm run build
    "lint": "vue-cli-service lint"    // npm run lint
}, 
// ...

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

module for digital signature using soap in Node.js

I am inquiring about the npm module "soap" and whether it supports digital signatures. I would like to create a soap header as shown below: <s:Header> <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws ...

What are the steps to install an outdated version of Node.js on a Windows computer?

I recently downloaded a package from https://nodejs.org/dist/. Upon attempting to run the Application file Node.exe, I found that it simply opens a terminal and does nothing. After downloading, I struggled to figure out the installation process. The reas ...

Invoking a nested method within Vue.js

I am facing an issue in my vuejs application with 2 methods. When I define method1 a certain way, it does not run as expected. method1: function(param1, param2){ // I can log param1 here thirdLib.debounce(function(param1, params2){ // It d ...

The element type provided is not valid: it should be a string for built-in components or a class/function for composite components. However, an object was received instead. - React Native

After conducting extensive research, I have been unable to find a solution as to why this issue persists. Can anyone shed some light on what the error might be referring to? Error: Element type is invalid: expected a string (for built-in components) or a c ...

What are the primary purposes of the NPM package.json file?

In my research (found here), I discovered that the package.json file's dependencies allow for easy installation of necessary components when using npm to install a project. The dependencies field is crucial, as it lists all required components avai ...

The peer dependency, which is also a development dependency of the linked npm module, seems to be operating as an independent entity

Within my application, I rely on the following dependencies: TypeORM Also, a local installation of typeorm-linq-repository has been configured using: "typeorm-linq-repository": "file:../../../IRCraziestTaxi/typeorm-linq-repository". This repository hold ...

Using React-Native for FTP Integration

Has anyone successfully managed to download/upload files and folders from FTP servers using react native? I tried using the react-native-ftp package but it doesn't seem to work. If you've faced a similar scenario, please share your insights! ...

Can a variable be declared within the path references of the Firebase database?

In an effort to update my app's database references, I am working on implementing specific Firebase rules that involve adding buildings and depts nodes inside the user node. This decision was prompted by a discussion on best practices for writing Fire ...

What is the best way to transfer information to a different component using Vue router?

At the moment, I have a component that is displayed on the page. When I check the this.$router variable inside this component, I notice that the full path property is '/hello/reports?report=3849534583957' and the path property is '/hello/rep ...

Steps for deploying updates from a Laravel + Inertia + Vue3 application to a production server

I have been working on a project for a client, making changes to Vue and SCSS files. I need to deploy these changes to the live server, which is hosted on Digital Ocean with server-side rendering enabled. "private": true, "scripts& ...

The absence of FormData.entries in submit is a limitation of the Vue framework

I recently created a Vue-App that consists of a simple form with just one <input name"surname"> and a <button type="submit">. The use case is to input "myname" and submit the form. However, when I initialize new FormData( ...

Add some pizzazz to your mid-morning meal with

Hey there! I'm fairly new to brunch and looking to incorporate animate.css into a single page of my project. I've successfully installed animate.css via npm and made the necessary adjustments in package.json. Here's how my brunch-config fil ...

Tips on personalizing the FirebaseUI- Web theme

Can someone help me find a way to customize the logo and colors in this code snippet? I've only come across solutions for Android so far. if (process.browser) { const firebaseui = require('firebaseui') console.log(firebaseui) ...

Every time I try to create a new React app, I consistently run into the same error

I keep encountering this error every time I try to create a React app using create-react-app. ...

Encountering an issue such as receiving the 'Error eacces mkdir' message when trying to execute the 'npm install -g create-react-app' command

Encountered an error while trying to install reactjs on Ubuntu using the npm install -g create-react-app command. The error message is as follows. Can someone please assist me in resolving this issue? This is the error I am receiving: npm ERR! Error: EAC ...

Using Vite for creating a production build: A step-by-step guide

Just getting started with Vite and ready to take it into production. I'm wondering how I can create scripts (specifically for docker) to successfully run it in a production environment. The documentation strongly advises against using the preview mod ...

Tips for correctly loading images and spritesheets using Phaser 3 and Webpack

I am currently working on a Vue app using Webpack and Phaser 3. My main goal is to properly load images and spritesheets in the main scene of the game. import Phaser from 'phaser' export class MainScene extends Phaser.Scene { constructor () { ...

Is the Vue router preloading each view before displaying it, or does it load the view server only upon request?

When I refer to preloading, I am questioning whether the browser loads all views at once or only loads the desired views from the server upon request. ...

Sharing data from AJAX calls in Vue using vue-resource

After using Vue resource, I'm attempting to create an AJAX call that is based on the data received from a prior AJAX call. I have successfully bound the data fetched from /me to the userDetails prop. However, when trying to pass userDetails.id into t ...

In Jenkins, there do not exist any configurations specifically for NodeJS installations

I've been struggling with this issue for a while now and haven't been able to find a solution online. Using Jenkins as my CI tool and Git as the source of code. The build trigger is set to another build stability. The plugin manager indicates th ...