I am trying to save a .vue file. I have installed vue cli. When I run the vue serve an error message displays in the command prompt which says "valid entry file should be one of:main.js, index.js, app.vue, App.vue"
Trying to save .vue file
509 Views Asked by Madhu At
2
There are 2 best solutions below
0
Deepak Terse
On
As you can see in the image above, main.js file is located in the src folder. I specified the path to the main.js file in the package.json file as follows:
"scripts": {
"dev": "vue serve src/main.js",
"prod": "vue build src/main.js"
}
And then I could simply run
npm run dev
for serving the project in the development environment and
npm run prod
for creating a production build under dist folder
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in VUE.JS
- Problems with matter.js and i18n in vue.js
- Form Validation not working in custom component Vue
- Authenticating vue app on each route change
- Vue/TailwindCSS - Content is behind Sidebar
- Vue3 Suspense Parent > Child Animation
- Pass dynamic object data via nuxt-link to component
- Failed to resolve import, but the path is valid, and detected as such by VSCode
- how to use less variables in vue components?
- Prevent a webpage from navigating away
- Creating a modal window in product edit page in Shopware6 and saving data to custom table(repository) from a form within the modal window
- How do I fix (or ignore) a TypeScript error that's inside a HTML template?
- Vue.js Checkbox Alignment Issue: Centering Checkboxes Within Table Cells
- How to reset vue product filter?
- Vue display output of two dimensional array
- vue js error when adding bonus items to another item
Related Questions in COMPONENTS
- React deploying as blank screen, in locally works fine
- How to pass a Blazor Component Instance to other Component and render it?
- How to pass the result of a computed property to another component in Vue
- Example on defining "New Components" compatible with the new Optimization class using Linopy
- double form in shacn with error in inputs
- How to make an animation happen everytime I click on a div that has the animation?
- Smarty - Best way to create reusable components
- Is there any library available same like notion select in React JS?
- difference between vuejs local registration syntax
- Add and remove dynamic component Angular
- Is it possible to define paginator if its inside ngIf?
- burger-menu bug with react (flickering)
- app.routes won't recognize my component in Angular
- Model attributes in the custom component controller of accelerator - How this is handled in the context of OCC and Spartacus?
- Import angular components by string name
Related Questions in VUE-COMPONENT
- tsParticles onHover not working on my Vue Project
- How to dynamically switch between two images onclick in Vue.js
- How can i display elements?
- How to toggle a v-if
- Problems in Validations via Web Service in a Vue 3 Application
- vuetify data-table-server binding paging properties
- I need to send an id from read component to update component. The id must be obtained by function updateItem(). But id is not sent to the child pag
- Vuejs child component props does not update when parent component update props value
- Handling a this.$router.replace(href); in vue 2
- diferrence between new vue & vue.createapp
- Is it possible to return a value from the $emit?
- Passing object with reactive properties as a prop triggers child component onUpdated hook when updating parent component state
- Dynamic image loading to not work in Vue project!! On no dynamic everything loads correct
- Error Element Plus Dynamic Tab component in Vue 3
- vue-hotel-datepicker is not working for PST — Pacific Standard Time
Related Questions in SFC
- Remove spaces between characters of output Batch file
- Vue sfc spec is not compatible with html5 or xhtml or any xml format
- How to import other js file in Django + Webpack + Vue2 + SFC
- What is "SFC Tool > Warning: Overlap: Duplicate ownership for directory"? Windows Server 2019 (cbs.log)
- How to run command in command prompt?
- Vue.js scoped css not working in single file component
- How to render multiple vue single file components on a page
- Trying to save .vue file
- How to implement a Service Function Chain (SFC) in OptaPlanner?
- Powershell DISM and SFC Script with Transcript
- How to convert html,js,css files into SFC using vue?
- Codesys question about using a Ladder function block into a SFC (doesn't work properly)
- In Vue SFC link click is not triggered first time
- SFC Steps in IEC 61131-3 Programming
- Different color for HTML tags in Vue SFC after reinstall
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

You should run
npm run buildrather thanvue build.They are two different commands.
npm run buildruns vue-cli-service build underlyingly, and its default entry is src/main.js.vue buildis for instant prototyping only. Its default entry is one of main.js, index.js, App.vue or app.vue in the current directory.