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

Get Store errors in NextJs API route #192

Open
himynameistim opened this issue Aug 19, 2024 · 1 comment
Open

Get Store errors in NextJs API route #192

himynameistim opened this issue Aug 19, 2024 · 1 comment
Labels
type: bug code to address defects in shipped code

Comments

@himynameistim
Copy link

Describe the bug

I have a site using NextJs 13.4.10, and the build log shows Netlify automicatically installing @netlify/plugin-nextjs@4.41.3.

My site contains an API route which calls an external service. To cut down the number of API calls to this service I'm attempting to cache the results using Netlify Blobs. This will use a deploy specific store.

When I call the function to get the store the application errors. e.g.

const myStore = getDeployStore('myStore')

The following error is shown in the logs

Aug 19, 08:37:39 AM: 77dc63f7 ERROR  MissingBlobsEnvironmentError: The environment has not been configured to use Netlify Blobs. To use it manually, supply the following properties when creating a store: deployID
    at getDeployStore (/var/task/node_modules/@netlify/blobs/dist/main.cjs:624:11)
    at PrismicServices.getAlternativeTracks (/var/task/.next/server/chunks/5428.js:589:92)
    at search_events (/var/task/.next/server/pages/api/search-events.js:681:61)
    at /var/task/node_modules/next/dist/server/api-utils/node.js:463:16
    at /var/task/node_modules/next/dist/server/lib/trace/tracer.js:117:36
    at NoopContextManager.with (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
    at ContextAPI.with (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
    at NoopTracer.startActiveSpan (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18086)
    at ProxyTracer.startActiveSpan (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18847)
    at /var/task/node_modules/next/dist/server/lib/trace/tracer.js:106:107
@himynameistim himynameistim added the type: bug code to address defects in shipped code label Aug 19, 2024
@Saurav017
Copy link

Hello @himynameistim , if this issue is still open. Can you please assign it to me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants