Git Product home page Git Product logo

Comments (7)

ekzobrain avatar ekzobrain commented on May 29, 2024 1

I think any other DI resolving error (for example if some token cannot be injected because it is not registered in the container) would behave the same.

from aurelia.

3cp avatar 3cp commented on May 29, 2024

What's wrong with my stackblitz? I tried to install the missing webpack-dev-server but it rejects it.

> webpack serve

[webpack-cli] You need to install 'webpack-dev-server' for running 'webpack serve'.
TypeError: callSite.getFileName is not a function. (In 'callSite.getFileName()', 'callSite.getFileName' is undefined)

~/projects/au2-conventions-pj6kbd 7s
❯ npm i -D webpack-dev-server
npm ERR! code ERR_INVALID_PROTOCOL
npm ERR! Protocol "https:" not supported. Expected "http:"

from aurelia.

ekzobrain avatar ekzobrain commented on May 29, 2024

Strange, for me the provided link works OK without any issues. webpack-dev-server is already listed in package-lock.json

from aurelia.

3cp avatar 3cp commented on May 29, 2024

I managed to reproduce the error locally.
The endpoint is a resolver which right now our conventions plugin doesn't cover. Before we cover it, user needs to use explicit decorator on this resource. cc @Sayan751

export type ResourceType = 'view' | 'customElement' | 'customAttribute' | 'valueConverter' | 'bindingBehavior' | 'bindingCommand' | 'templateController';

from aurelia.

3cp avatar 3cp commented on May 29, 2024

OK, I also saw that $isResolver: true fixes the issue. I don't know what's the design, use that meta flag, or there is a special decorator for resolver. cc @Sayan751

from aurelia.

ekzobrain avatar ekzobrain commented on May 29, 2024

$isResolver: true must be used for a valid resolver, a resolver interface requires it. I commented it out intentionally to show that an error thrown by DI system is caugth and swallowed by the router. It should not do it, so that developer may see what's the source of the problem.

from aurelia.

3cp avatar 3cp commented on May 29, 2024

The doc asks you to write $isResolver: true. Why skip it?

https://docs.aurelia.io/getting-to-know-aurelia/overview/resolvers#example-of-a-custom-resolver

from aurelia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.