Warning: Please note that the command 'vue init webpack my-project' is deprecated and may not be supported in future

My Objective: I aim to start a Vue.js project by executing the command vue init webpack myproject

Expected Outcome: The installation of all dependencies without any fatal errors, and being able to run the project using npm dev run, accessible at http://localhost:8080

Actual Outcome:

# Installing project dependencies ...
# ========================

npm WARN deprecated [email protected]: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near '...,"dist":{"shasum":"1e'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-12T06_01_01_
430Z-debug.log


Running eslint --fix to comply with chosen preset rules...
# ========================


> [email protected] lint F:\SourceCode\Travel-master\Travel
> eslint --ext .js,.vue src "--fix"


Oops! Something went wrong! :(

ESLint: 6.8.0.

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "F:\SourceCode\Travel-master\Travel".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] lint: `eslint --ext .js,.vue src "--fix"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-12T06_01_04_
492Z-debug.log

# Project initialization finished!
# ========================

To get started:

cd Travel
npm run dev

Documentation can be found at https://vuejs-templates.github.io/webpack


Attempted Solutions

I followed the commands mentioned above like

npm install eslint-plugin-vue@latest --save-dev
, but encountered another issue:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for eslint-plugin-vue@lastest.
npm ERR! notarget In most cases, you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-12T06_09_11_
766Z-debug.log

Even when I tried

npm install webpack -dev-server -g
, another problem arose:

C:\Program Files\nodejs\webpack -> C:\Program Files\nodejs\node_modules\webpack\bin\webp
ack.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack\no
de_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]:
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ [email protected]
added 322 packages from 197 contributors in 255.517s

Answer №1

Struggling with a similar issue while coding my MEVN app, I encountered the same problem when using the command vue init webpack client.

After some research on npm, I discovered that the old method is no longer valid. Instead, you need to install Vue CLI globally using npm install -g @vue/cli, and then create your project using vue create <dir name>.

For more detailed instructions, refer to the documentation on https://www.npmjs.com/package/@vue/cli and the official Vue.js website https://cli.vuejs.org/.

I hope this solution helps you in your coding journey!

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

Tips for interacting with a modal using Bootstrap Vue

I have implemented a sophisticated modal in its own component. It operates on a duplicate of the supplied model to enable the user to cancel the action. <template> <b-modal v-if="itemCopy" v-model="shown" @cancel="$emit('input& ...

Can you create reusable components in Wordpress that are encapsulated?

In my quest to explore innovative approaches to Wordpress theme development, I have stumbled upon a variety of options such as the "Roots Sage" starter theme, the "Themosis Framework," and "Flynt." While these solutions address intriguing problems, they do ...

Navigate a collection of items using Partial Link Text in Selenium

I'm in need of assistance with conducting an investigation and making improvements. My objective is to collect all the <a> tags containing the text Annual Report as part of their content, and then iterate through them as they are originally loc ...

Node.js application with decoupled Redis client

In my node.js app, I am utilizing Redis for user caching. Once a user logs in, their information is cached and accessed on subsequent requests to determine their access level. This allows the client to receive personalized information and views based on th ...

Replacing old items with new ones: AngularJS now pushes to array in service

I am attempting to update a list in the home.html file and then display the updated list in myOrders.html using ionic and angularjs. The issue I am facing is that whenever I add a new item to the array, it replaces all the previous items with the new one. ...

Is it possible for a local variable in Vuex to update with a mapState value, so that changing the local variable will also update

Why is my Vuex object being modified when I assign its value to a local variable and make changes to the local copy? Should I provide my store.js for reference? My code looks like this: data() { return { localObject: [], }; }, computed: ...

What is the best way to use jQuery to emphasize specific choices within an HTML select element?

Seeking help with jQuery and RegEx in JavaScript for selecting specific options in an HTML select list. var ddl = $($get('<%= someddl.ClientID %>')); Is there a way to utilize the .each() function for this task? For Instance: <select i ...

Applying a CSS transition to transform properties excluding rotation effects

I'm looking to apply a transitional animation to an element's transform property without affecting the rotation. Here is the code snippet: <html> <head> <link rel="stylesheet" href="style.css"> <script src="script.js ...

Vue nearly completed production build displays a message saying "This webpage is causing your browser to lag"

I'm currently in the process of developing a web application using Vue and Quasar. In my development environment, everything functions properly and loads as expected. I start the development server like so: npm run serve However, when I attempt to bu ...

After compiling my project using npm run dev, Vue 3 throws an error

Hey there! I recently attempted to install the necessary dependencies for a Vue.JS app repository by running npm install. Subsequently, I launched the Vue.JS app using npm run dev. However, upon execution, an error popped up in the terminal: PS G:\ma ...

Where can I locate the Socket.IO server within the local area network (LAN)?

I am currently in the process of developing an application that facilitates connections between devices within the same network. In my design, any device can act as a server, and I aim for clients to automatically detect the server without requiring users ...

JavaScript function to toggle visibility and scroll back to top of the page

I have been an avid reader on this platform, and I am hoping that my question has not already been addressed. I am struggling to find a solution to a problem I am facing. There are two DIVs in my code that I toggle between showing and hiding using Javascr ...

Encountering issues with styling the search bar using CSS and unable to see any changes reflected

I am currently working on creating a searchBar and customizing its CSS, but unfortunately, most of the styling properties seem to not be taking effect. So far, only changing colors seems to work as expected. .mainBar{ background-color: blue; width: ...

Adjust the width of a div element based on a data property in Vue using animations

I am currently working on a progress bar div that has its width tied to a data property called "result" and adjusts accordingly. However, the transition is still abrupt and I would like to add some animation to it. I have considered using CSS variables o ...

The email protected function is failing to display components and is not generating any error logs

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="05776064667128776a7071607728616a6845332b31">[email protected]</a> seems to be having trouble rendering components. I've been away from React for a bit and now I ...

Incorporating a scroll feature using Ionic React

Currently, I am attempting to include a button in my Ionic React project that will smoothly scroll to the top of the page. Below is a snippet of the code I have written thus far: ... function scrollToTop() { return document.getElementById("page")!.scr ...

How can I create a dynamic height for a scrollable div?

How can I build a section with a defined height that contains a sticky header (with a dynamic height) and a scrollable body? I want the body to be scrollable, but due to the header's changing height, I'm unable to set an exact height. What should ...

Tips for closing two nested Material-UI popovers when a button is clicked or when clicked elsewhere

Trying to create a menu with nested popovers from Material-ui has presented a challenge. I want all the popovers to close when I click on a menu option, rather than having to close them individually. Additionally, it would be more user-friendly if the popo ...

Retrieve worldwide data for the entire application in Next.js during the first page load

Within my Next.js application, I am implementing search filters that consist of checkboxes. To display these checkboxes, I need to retrieve all possible options from the API. Since these filters are utilized on multiple pages, it is important to fetch the ...

Transition from traditional class-based components to functional components

I am utilizing the ref from the parent class to access the child class. However, in this scenario, I want to access the child functional component from the parent class. In the parent class: class Waveform extends Component { constructor(props){ s ...