Skip to content

npm run serve not working #4900

@ptkab

Description

@ptkab

Version

4.1.1

Environment info

System:
    OS: Windows 7 6.1.7601
    CPU: (4) x64 Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
  Binaries:
    Node: 10.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.5.0 - C:\Program Files\nodejs\npm.CMD
  npmGlobalPackages:
    @vue/cli: Not Found

@vue/cli 4.1.1 is actually installed globally and vue command is available.

Steps to reproduce

Create a project using vue create
  • vue create my-project
Go the directory my-project
  • cd my-project
Run my-project with serve
  • npm run serve

What is expected?

The project should start in development mode with hot reload.

What is actually happening?

The command terminates without starting anything.
If we run vue serve instead of npm run serve, it errors out the following in the terminal and exits:

Failed to locate entry file in my/project/directory/path.
Valid entry file should be one of: main.js, index.js, App.vue or app.vue.

So I am assuming npm run serve tries to find either of the above mentioned files but is not able to find any and hence terminates. The reason is, none of the "entry" files are in the project's root directory but inside the src directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cannot reproduceWe cannot reproduce the problem with the given information. More env information needed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions