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

Kite npm install needed for pre-commit? #228

Open
jonathanolson opened this issue Dec 24, 2024 · 1 comment
Open

Kite npm install needed for pre-commit? #228

jonathanolson opened this issue Dec 24, 2024 · 1 comment
Assignees

Comments

@jonathanolson
Copy link
Contributor

I just created a new checkout (clone-missing-repos, main-pull-status), then ran sage run ../chipper/js/grunt/tasks/pre-commit.ts under example-sim.

Failed with:

../../../../kite/js/grunt/tasks/generate-svg-path-parser.ts:9:19 - error TS2307: Cannot find module 'pegjs' or its corresponding type declarations.

9 import pegjs from 'pegjs';
                    ~~~~~~~

../../../../kite/js/grunt/tasks/generate-svg-path-parser.ts:13:1 - error TS2578: Unused '@ts-expect-error' directive.

13 // @ts-expect-error - older version of pegjs such that typescript doesn't know about this function
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors.
@zepumph
Copy link
Member

zepumph commented Jan 2, 2025

Thanks. I believe that the best path is to house all npm modules in perennial, and so kite would use pegjs from perennial-alias. I want to ask if that is acceptable to proceed this way in smaller cases like this, since I know we have discussed that the most idiomatic way is to use npm modules in the repo it requires, and rely on npm to manage things for us.

Another (bad) solution, is to make a convention that if you have an npm dependency, then your grunt task must live in chipper, even if it is only used by kite. Perhaps it could live in chipper/js/grunt/tasks/kite, and then kite's gruntfile can extend chipper's, and register tasks manually for that kite-specific dir in chipper.

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

No branches or pull requests

2 participants