Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to start an html website using NPM and Lite-server #201

Open
Nomal-patel opened this issue Sep 27, 2021 · 2 comments
Open

Trying to start an html website using NPM and Lite-server #201

Nomal-patel opened this issue Sep 27, 2021 · 2 comments

Comments

@Nomal-patel
Copy link

Before you open an issue, please check if a similar issue already exists or has been closed before.

A descriptive title

The behavior you expect to see, and the actual behavior...

For feature requests, a description of the problem you're trying to solve, including why you think this is a problem.

Bug repro steps

Please give us an isolated way to reproduce the behavior (example: GitHub repository with code that anyone can clone to observe the problem, or a Dockerfile that replicates your environment):

Environment

  • lite-server version:
  • nodejs version:
  • npm version:
  • OS type/version:
@Nomal-patel
Copy link
Author

So I have to start an html file from the VS code terminal using npm start for my bootcamp. But I when I do that the webppage gives me an error cannot GET/. My instructor says its a linux problem
Screenshot from 2021-09-26 12-01-40
Screenshot from 2021-09-26 12-01-34

@Barabazs
Copy link

Barabazs commented Oct 6, 2021

@Nomal-patel lite-server can't find your index.html (see the 404 error)

Did you start lite-server from the same directory as where your index.html is saved?

Otherwise you should use --baseDir option.
For example:
My index.html is in the subfolder "src".
So I start live-server like this: lite-server --baseDir='src'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants