marko-js / marko

A declarative, HTML-based language that makes building web apps fun
https://markojs.com/
MIT License
13.35k stars 643 forks source link

Uncaught Error: Not found:view/components/app-header/index.marko #1133

Closed poovarasanvasudevan closed 4 years ago

poovarasanvasudevan commented 5 years ago

Marko Version: 4.13.5

Details

I am getting this error in console image

Expected Behavior

i am attempting onclick on the button in a component

class {
    logthis() {
        console.log('test')
    }
}
<button#login-btn.adg-button--subtle onClick('logthis')> Log in </button>

Actual Behavior

Showing Console error on load, click event not working

Possible Fix

Additional Info ### Your Environment - Environment name and version (e.g. Chrome 39, node.js 5.4): Chrome 66 - Operating System and version (desktop or mobile): Windows 7 ### Steps to Reproduce 1. i used markojs webpack and express 2. i created a component folder inside views/ (views/component) ### Stack Trace ``` index-browser.js:3 Uncaught Error: Not found: /Nxt$1.0.0/view/components/app-header/index.marko at load (index-browser.js:3) at load (registry-browser.js:31) at getComponentClass (registry-browser.js:57) at Object.createComponent [as ___createComponent] (registry-browser.js:77) at Function../node_modules/marko/src/components/ComponentDef.js.ComponentDef.___deserialize (ComponentDef.js:106) at init-components-browser.js:292 at Array.forEach () at Object.initServerRendered [as concat] (init-components-browser.js:291) at a:7 at a:7 ```
cameronbraid commented 5 years ago

Try changing from onClick('logthis') to on-click('logthis')

poovarasanvasudevan commented 5 years ago

Yes i tried... Same happends.. The error appears in on loading of the page...

SandeepVattapparambil commented 5 years ago

Try creating a new sample project with the same logic and upload the repo link, so that we can inspect the code.

DylanPiercey commented 4 years ago

This is likely due to some issue with the lasso config. Perhaps an outdated lasso-marko plugin?

Closing for now until we get more info.