Skip to content

Possible Cypress related issue with package.json scripts setup #175

@cfjedimaster

Description

@cfjedimaster

I scaffolded a new application with npm init vue@latest, and during the prompts, I selected YES to Cypress. After it was done, I went into the directory, ran npm i, and then tried:

npm run test:e2e

When I did, it hung at:

image

I asked around on the Cypress discord, and did some digging, and noticed the following.

If I did npm run dev, of course the Vue app worked fine. But if I ran the preview task as created during scaffolding, vite preview --port 4173, it did NOT build the Vue app. I'd hit the URL and get, "Cannot GET /" (or something like that ;).

If I remove 'preview' from the command:

    "preview": "vite --port 4173",

I can then run the test:e2e task ok.

So there's definitely a workaround, but "out of the box", it seems like the scaffolded scripts may be wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions