hqjs / vscode-hq-live-server

Visual studio code extension for HQ Live server
MIT License
10 stars 1 forks source link

Trying to "Serve project", but "File / not found" #8

Closed MrTasken closed 3 years ago

MrTasken commented 3 years ago

When I try to serve my fresh polymer2 project I get this error:

File / not found
NotFoundError: File / not found
    at Object.throw (/home/.../.vscode/extensions/hqjs.hq-live-server-0.0.7/node_modules/koa/lib/context.js:97:11)
    at resolveSrc (file:///home/.../.vscode/extensions/hqjs.hq-live-server-0.0.7/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:116:31)

I tried to serve my polymer project from both right clicking the index.html file and starting from the botton icon. Same error, seems like it doesn't find nor use the index.html?

hqjs commented 3 years ago

Thanks for reporting. It should search for index.html. Did you open your project as a folder? Can you please share the project structure?

MrTasken commented 3 years ago

Yes, I opened up my project like this:

> cd /project/
> code ./

The folder structure is the same as what you get when you use:

> polymer init
> Then I select - polymer 2 application

Do you think it needs to be opened another way? If so, how do you recommend to open a project?

MrTasken commented 3 years ago

I tested it again on another fresh project, there the server actually started!? Not sure what's the difference is, shouldn't be any at all.

However it didn't run(or serve?) the polymer-app, the HTML worked, just no "Hello my-app" message.

The only difference I can think of is on the first project, I tried ">polymer build" as well, just to test it out. It still fails with the same message, even if I open the two projects exactly the same..

hqjs commented 3 years ago

Ah, I see. Unfortunately polymer 2 relies on html imports that were deprecated and not supported by hq. Please try to use polymer 3 instead.

MrTasken commented 3 years ago

A Polymer 3 application works. Thanks.

carlosnpz commented 2 years ago

Hey, I'm getting this error on a WordPress project, running xampp on Windows:

File / not found NotFoundError: File / not found at Object.throw (c:\Users\Carlos Nepoziano.vscode\extensions\hqjs.hq-live-server-0.0.11\node_modules\koa\lib\context.js:97:11) at resolveSrc (file:///c:/Users/Carlos%20Nepoziano/.vscode/extensions/hqjs.hq-live-server-0.0.11/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:119:31) at async file:///c:/Users/Carlos%20Nepoziano/.vscode/extensions/hqjs.hq-live-server-0.0.11/node_modules/@hqjs/hq/middlewares/resolve-path.mjs:38:5 at async cors (c:\Users\Carlos Nepoziano.vscode\extensions\hqjs.hq-live-server-0.0.11\node_modules\@koa\cors\index.js:56:32) at async file:///c:/Users/Carlos%20Nepoziano/.vscode/extensions/hqjs.hq-live-server-0.0.11/node_modules/@hqjs/hq/middlewares/error-handler.mjs:5:5