question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

require from of css fails without proper logging making it hard to diagnose

See original GitHub issue

I’m submitting a bug report

  • Library Version: 0.18.0

Please tell us about your environment:

  • Operating System: Windows 10
  • Node Version: 4.3.7
  • NPM Version: 3.10.7
  • Browser: Chrome
  • Language: TypeScript

Current behavior:

Expected/desired behavior:

In your html do a require that has an invalid name/path <require from="./aurelia-grid.css"></require> The load fails with a crash vendor-bundle.js:formatted:4098 Uncaught TypeError: h.load is not a function Which makes it impossible to figure out what the error is.

The problem is in this line: https://github.com/aurelia/cli/blob/b02946c6b45262781f85ebc3ff1ae18e8102669f/lib/build/amodro-trace/lib/loader/require.js#L1092 map.name in that line has the exact path you are trying to load e.g. “./aurelia-grid.css”.

A quick check for if (!plugin.load) { .. } throw error that it could not find file map.name “./aurelia-grid.css” and maybe the context would save lots of hours of debugging.

  • What is the expected behavior? Throw a proper error that can point to the problem.
  • What is the motivation / use case for changing the behavior? Simplify diagnosing.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
JayDi85commented, Oct 4, 2016

@nexbit no, it’s not a resource path problem. All data have write correct in vendor-bundle.js by text!name_of_css index. Sometimes, you can fix it by change module position in aurelia.json config file – like add new library with css before or after bootstrap v4 library.

Here is firefox log:

shot_161004_203508

After that I found that line of code in \scripts\require.js and add console.log(plugin); before load. And that plugin param was empty object. Other resources (not CSS) loads good.

1reaction
avrahamcoolcommented, Feb 4, 2019

@EisenbergEffect considering that the tracer was completely re-written - I think this one is safe to close.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS not being applied in pages :/ · Discussion #22495
Now, i'm trying to move my codepen HTML and CSS over here. HTML is working, but CSS is not being applied. I'm obviously...
Read more >
Tailwind CSS classes is not working in my project?
This error is due to tailwind not finding any classes to scan in what it 'thinks' is your HTML code directories.
Read more >
Failures | Techniques for WCAG 2.0
This describes the failure condition that results when CSS, rather than structural markup, is used to modify the visual layout of the content, ......
Read more >
Debugging CSS - Learn web development | MDN
So there we have it: an introduction to debugging CSS, which should give you some useful skills to count on when you start...
Read more >
Insufficient Logging and Monitoring: Ultimate Guide 2022
This article explores various vulnerabilities arising from insufficient logging and monitoring and the best practices to prevent attackers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found