-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Description
Issue summary
Before opening this issue, I have:
- Upgraded to the latest version of the relevant packages
@shopify/*
package and version: "@shopify/shopify-api": "^11.11.1"- Node version: 22.14.0
- Operating system: Ubuntu 22
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Looked for similar issues in this repositoryTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
I'm running a Nuxt 3.16 application. See code below, which in the Nuxt world is a server API. When initializing the shopifyApi()
, I'm getting the error:
Missing adapter implementation for 'abstractRuntimeString' - make sure to import the appropriate adapter for your platform
I've attempted to import the node
and web-api
, but the error persists. Any ideas with Nuxt on how to overcome this adapter issue?
import '@shopify/shopify-api/adapters/node'
import { ApiVersion, shopifyApi } from '@shopify/shopify-api'
import { process } from 'std-env'
export default defineEventHandler(async event => {
try {
const SHOPIFY_API_KEY = process.env.SHOPIFY_CLIENT_ID
const SHOPIFY_API_SECRET = process.env.SHOPIFY_CLIENT_SECRET
const SHOPIFY_REDIRECT_URI = process.env.SHOPIFY_REDIRECT_URI
if (!SHOPIFY_API_KEY || !SHOPIFY_API_SECRET || !SHOPIFY_REDIRECT_URI) {
throw new Error(
'Invalid Shopify credentials. Please set SHOPIFY_CLIENT_ID and SHOPIFY_CLIENT_SECRET in your environment variables.',
)
}
const SCOPES = ['read_products', 'write_products', 'read_orders', 'write_orders']
const body = await readBody(event)
const { storeName } = body
if (!storeName) {
throw createError({
statusCode: 400,
statusMessage: 'Missing shop URL',
})
}
// Initialize Shopify API
// https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/shopifyApi.md
const shopify = shopifyApi({
apiKey: SHOPIFY_API_KEY,
apiSecretKey: SHOPIFY_API_SECRET,
scopes: SCOPES,
hostName: SHOPIFY_REDIRECT_URI,
apiVersion: ApiVersion.January25,
isEmbeddedApp: false,
})
// Clean up the shop URL to ensure it's just the domain
const shop = shopify.utils.sanitizeShop(storeName, true)
if (!shop) {
throw createError({
statusCode: 400,
statusMessage: 'Invalid shop URL',
})
}
// Create a new auth session
const callbackPath = '/api/shopify/callback'
// Generate the authorization URL
const authSession = await shopify.auth.begin({
shop,
callbackPath,
isOnline: false,
rawRequest: event.node.req,
})
return {
success: true,
redirectUrl: authSession,
}
} catch (error) {
const errorMessage =
error instanceof Error ? error.message : 'Failed to start Shopify installation'
throw createError({
statusCode: 500,
statusMessage: errorMessage,
data: error,
})
}
})
majorwaves, mateuszstonawski, pevin and ezmillerAhmedKaram50 and ezmiller
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
ghardin1314 commentedon Apr 2, 2025
Running into the same exact issue using tanstack start. I think it has something to do with the underlying Nitro server
mateuszstonawski commentedon Apr 7, 2025
Also running into the same issue when using Next.js
pevin commentedon Apr 24, 2025
I ran into the same issue after upgrading to
@shopify/shopify-api
v11. Wasn't even able to import@shopify/shopify-api/adapters/node
-- it says Unable to resolve path to moduleWould really appreciate some traction on this issue.
EDIT: the app is running in nestjs
AhmedKaram50 commentedon May 12, 2025
Same Problem with me
"nuxt": "^3.17.2",
"@shopify/shopify-api": "^11.12.0",
github-actions commentedon Jul 12, 2025
We're labeling this issue as stale because there hasn't been any activity on it for 60 days. While the issue will stay open and we hope to resolve it, this helps us prioritize community requests.
You can add a comment to remove the label if it's still relevant, and we can re-evaluate it.
djordje-st commentedon Aug 2, 2025
This is still an issue. I'm using the latest version on TanStack Start.
djordje-st commentedon Aug 2, 2025
Found a workaround, add these to your vite config file: