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

Missing Less Imports fail with misleading error #1192

Open
1 of 5 tasks
hurgleburgler opened this issue Aug 14, 2019 · 1 comment
Open
1 of 5 tasks

Missing Less Imports fail with misleading error #1192

hurgleburgler opened this issue Aug 14, 2019 · 1 comment
Labels

Comments

@hurgleburgler
Copy link

How often can you reproduce it?

  • Always
  • Sometimes
  • Rarely
  • Unable
  • I didn’t try

Description:
Importing a file that doesn't exist in Less doesn't result in a helpful error, instead you receive a index.stache:8: Unable to find key "this.routeData.page".

Steps to reproduce:

  1. npm install -g donejs@3
  2. donejs add app place-my-order --yes
  3. cd place-my-order
  4. donejs develop
  5. Load page and note no error on server's command line
  6. Open styles.less
  7. Add import that isn't installed yet: @import '../node_modules/@mdi/font/css/materialdesignicons.min.css';
  8. donejs develop
  9. Note error on the server's command line when page is loaded: index.stache:8: Unable to find key "this.routeData.page".
  10. Install necessary package: npm install --save @mdi/font
  11. Reload server and note that error is now gone

Expected results:
A proper error message. The template error is a rabbit hole that isn't the real problem.

Actual results:
Misleading error message.

Note: This can be done with ANY missing LESS import. The above is just an example.

Environment:

Software Version
donejs -V 3.2.0
node -v v11.14.0
npm -v 6.9.0
Browser Any
Operating system Osx
@matthewp matthewp added the bug label Aug 16, 2019
@matthewp
Copy link
Contributor

Thanks, once CanJS 6 is out I hope to have a little time to work on DoneJS bugs, and I'm keeping a list of these. Thanks again for reporting.

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

No branches or pull requests

2 participants