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

[@player-tools/cli] Add more info on compilation failures #67

Open
rafbcampos opened this issue Feb 8, 2024 · 0 comments
Open

[@player-tools/cli] Add more info on compilation failures #67

rafbcampos opened this issue Feb 8, 2024 · 0 comments
Labels
enhancement New feature or request More Details Needed More details and specifics needed to fully outline the work that needs to be done

Comments

@rafbcampos
Copy link
Contributor

rafbcampos commented Feb 8, 2024

Feature request

It'd be beneficial to have the error stack logged on compilation errors here, so we can pinpoint where the syntax error occurred (given that it could be within an imported file).

Context

It could be challenging to determine where the error originated if you leverage barrels or flow import the .tsx files from elsewhere.

Example:

// index.ts
import { PLUGIN_ID } from "../constants";
import { navigation } from "./navigation";
import { schema } from "./schema";
import { views } from "./views";

const flow = {
  id: PLUGIN_ID,
  views,
  navigation,
  schema,
};

export default flow;

If there is an error on any of the views leveraged by the flow above, the error will point to the file being compiled:

Error compiling index.ts: Expected comma at character 26

Hopefully, the error stack trace can provide more info on which imported file is the culprit.

@rafbcampos rafbcampos added the enhancement New feature or request label Feb 8, 2024
@KetanReddy KetanReddy added the More Details Needed More details and specifics needed to fully outline the work that needs to be done label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request More Details Needed More details and specifics needed to fully outline the work that needs to be done
Projects
None yet
Development

No branches or pull requests

2 participants