meteor / meteor/blaze

Blaze compile errors completely silent if imported

Open
#396 12 comments 8 reactions 0 assignees View on GitHub
confirmed hacktoberfest
Dominant language
JavaScript
Stars
543
Forks
117
Avg merge
6h 18m
Merged PRs (30d)
2

Description

In version 1.8 when compiling a blaze template from the `/imports` directory all errors are swallowed breaking the normal development process, because you get no line numbers or error specifications.

In 1.7 this problem is not present.

Reproduction:
Create a new meteor 1.8 project.

create a new malformed blaze template in the client folder.
```

{{#if}

```
You will get a compile error
```
Errors prevented startup:

While processing files with templating-compiler (for target web.browser):
client/test.html:2: Expected `}}`
```

Now move the file to `/imports/client` and add the import statement `import '/imports/client/test.html';` to main.js.

There is no compile time error, but when running the app you get the following run time error
`Uncaught Error: Cannot find module '/imports/client/test.html'`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the malformed imports/client/test.html template and the import statement in main.js under Meteor 1.8. Start by tracing how templating-compiler reports errors for client/test.html versus imported files. Done when the imported malformed template produces a compile-time error with its line number and details instead of only a runtime module error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.