I’m attempting to use the PlanetScale integration with some sample code. I have the file store_user.ts
in my netlify/functions
directory. But the first line gives me problems:
import { withPlanetscale } from '@netlify/planetscale'
The failure is below. The confusing part is I’m not using yarn, I’ve never used yarn in this app, and there are no yarn files in my repo. I have @netlify/planetscale
in my package.json
and it’s been installed (I see it in node_modules
).
Build log:
◈ Reloading function store-user...
✘ [ERROR] Could not resolve "@netlify/planetscale"
netlify/functions/store-user.ts:2:32:
2 │ import { withPlanetscale } from '@netlify/planetscale'
╵ ~~~~~~~~~~~~~~~~~~~~~~
The Yarn Plug'n'Play manifest forbids importing "@netlify/planetscale" here because it's not
listed as a dependency of this package:
../../../.pnp.cjs:1107:33:
1107 │ "packageDependencies": [
╵ ^
You can mark the path "@netlify/planetscale" as external to exclude it from the bundle, which will
remove this error and leave the unresolved path in the bundle.
I don’t think I’m doing anything special; just following the instructions on how it seems you’re supposed to enable this integration. But I don’t see any reference to this error elsewhere, which surprises me. Any assistance is gratefully appreciated.