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

Setup and generateRoutes fail in monorepo #3

Open
discoverlance-com opened this issue Jun 29, 2024 · 0 comments
Open

Setup and generateRoutes fail in monorepo #3

discoverlance-com opened this issue Jun 29, 2024 · 0 comments

Comments

@discoverlance-com
Copy link

Setting up the package in a monorepo leads to issues. The generateRoutes function in src/generate_routes.ts uses a node_modules/@izzyjs/route/build/src/client path which does not work for a monorepo because monorepos have their node_modules in the root and not in the package or app folder where adonis is being used and installed.

The initial setup command, node ace add @izzyjs/route also resulted in some weird issues initially when I run it in the app in my monorepo, it was somehow adding the package to the package.json file but not installing in node_modules. I manually installed the package by running yarn install in the root of the monorepo but when I run the initial setup command again, I realized that it actually deleted the package installed from the node_modules, not sure why.

So I manually installed the package and went through the configure.ts to configure the rest of the application and it worked only that now, I am not able to get the node ace izzy:routes command to work because of the node_modules issue.

For now, I might have to patch the package locally, and use a workaround of setting the baseDir this way: const baseDir = '../../node_modules/@izzyjs/route/build/src/client'; which allows me to point to my root node_modules.

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

1 participant