You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Setting up the package in a monorepo leads to issues. The
generateRoutes
function insrc/generate_routes.ts
uses anode_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 thepackage.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 thenode 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.The text was updated successfully, but these errors were encountered: