{"record":{"id":"4fc049f01c81dc52","repo":"vercel/turborepo","slug":"some-manual-modifications-may-be-required","errorCode":null,"errorMessage":"Some manual modifications may be required.","messagePattern":"Some manual modifications may be required\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/turbo-gen/src/generators/copy.ts","lineNumber":26,"sourceCode":"  type DependencyGroups,\n  type PackageJson\n} from \"@turbo/utils\";\nimport { gatherAddRequirements } from \"../utils/gather-add-requirements\";\nimport type { TurboGeneratorArguments } from \"./types\";\n\nexport async function generate({ project, opts }: TurboGeneratorArguments) {\n  const { name, type, location, source, dependencies } =\n    await gatherAddRequirements({\n      project,\n      opts\n    });\n\n  const newPackageJsonPath = path.join(location.absolute, \"package.json\");\n\n  // copying from a remote example\n  if (opts.copy.type === \"external\") {\n    logger.log();\n    logger.warn(\"Some manual modifications may be required.\");\n    logger.dimmed(\n      `This ${type} may require local dependencies or a different package manager than what is available in this repo`\n    );\n    await createProject({\n      appPath: location.absolute,\n      example: opts.copy.source,\n      examplePath: opts.examplePath\n    });\n\n    try {\n      if (fs.existsSync(newPackageJsonPath)) {\n        const packageJson = (await fs.readJSON(\n          newPackageJsonPath\n        )) as PackageJson;\n        if (packageJson.workspaces) {\n          throw new Error(\n            \"New workspace root detected - unexpected 'workspaces' field in package.json\"\n          );","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/vercel/turborepo/blob/f9245100cf0d31d96628804ead485f6bf226e55a/packages/turbo-gen/src/generators/copy.ts#L8-L44","documentation":"Emitted by turbo-gen's copy generator when the copy source is external (`opts.copy.type === 'external'`), i.e. the new package is created from a remote example via createProject. Because no transform converts the example to your repo's package manager or dependencies, turbo warns up front that the result may need manual fixes, then scaffolds the project and patches its package.json best-effort.","triggerScenarios":"`turbo generate` with a copy source that is a remote/external example, so the template's package manager and dependency assumptions may not match the local monorepo.","commonSituations":"Pulling a public starter into a monorepo that uses a different package manager; templates referencing packages that do not exist in the workspace.","solutions":["After generation, review the new package's package.json and align the packageManager field and dependency versions with the repo","Add missing workspace dependencies (`workspace:*`) or install them","Prefer local generator templates when reproducibility matters"],"exampleFix":"// before: package.json generated from a remote example\n\"packageManager\": \"pnpm@9.0.0\",\n\"dependencies\": { \"ui-kit\": \"^1.0.0\" } // not in this monorepo\n\n// after: aligned with the repo\n\"dependencies\": { \"@acme/ui-kit\": \"workspace:*\" }","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Review the generated package.json immediately: packageManager field and dependency ranges","Swap template deps for `workspace:*` dependencies where the monorepo provides them","Prefer local (internal) generator sources for reproducible scaffolding","Budget for a manual cleanup commit whenever generating from external examples"],"tags":["turbo-generate","templates","external-example"],"backgroundTag":"template-compatibility","analyzedSha":"f9245100cf0d31d96628804ead485f6bf226e55a","analyzedAt":"2026-08-17T10:46:15.696Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}