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

fix: include ajv in devDependencies for Expo Router and npm #2842

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/commands/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,11 @@ module.exports = {
// do base install
const installCmd = packager.installCmd({ packagerName })
await system.run(installCmd, { onProgress: log })
// If they chose npm and also Expo Router, we need to run npm install ajv@^8 --legacy-peer-deps.
// see https://github.com/infinitered/ignite/issues/2840
if (packagerName === "npm" && experimentalExpoRouter) {
await system.run(`npm install ajv@^8 --legacy-peer-deps`, { onProgress: log })
}
// now that expo is installed, we can run their install --fix for best Expo SDK compatibility
const forwardOptions = packagerName === "npm" ? " -- --legacy-peer-deps" : ""
await system.run(`npx expo install --fix${forwardOptions}`, { onProgress: log })
Expand Down