Djkáťo
Djkáťo
Explore posts from servers
DDeno
Created by Djkáťo on 4/9/2025 in #help
Uncaught (in promise) TypeError: Relative import path "@payloadcms/next/withPayload" not prefixed
Trying to deno-ify my payloadcms project, and I'm facing import issues related to deno.json.
{
"name": "@project/backend",
"exports": "./src",
"tasks": {
"build": "next build",
"dev": "next dev",
"devsafe": "rm -rf .next && next dev",
"generate:importmap": "payload generate:importmap",
"generate:types": "payload generate:types",
},
"imports": {
"@payloadcms/next": "npm:@payloadcms/[email protected]/",
"@payloadcms/payload-cloud": "npm:@payloadcms/[email protected]",
"@payloadcms/richtext-lexical": "npm:@payloadcms/[email protected]",
"cross-env": "npm:cross-env@^7.0.3",
"graphql": "npm:graphql@^16.8.1",
"next": "npm:[email protected]",
"payload": "npm:[email protected]",
//...
}
}
{
"name": "@project/backend",
"exports": "./src",
"tasks": {
"build": "next build",
"dev": "next dev",
"devsafe": "rm -rf .next && next dev",
"generate:importmap": "payload generate:importmap",
"generate:types": "payload generate:types",
},
"imports": {
"@payloadcms/next": "npm:@payloadcms/[email protected]/",
"@payloadcms/payload-cloud": "npm:@payloadcms/[email protected]",
"@payloadcms/richtext-lexical": "npm:@payloadcms/[email protected]",
"cross-env": "npm:cross-env@^7.0.3",
"graphql": "npm:graphql@^16.8.1",
"next": "npm:[email protected]",
"payload": "npm:[email protected]",
//...
}
}
And the default template project does: next.config.mjs
import { withPayload } from "@payloadcms/next/withPayload";

const nextConfig = {
// Your Next.js config here
};
export default withPayload(nextConfig, { devBundleServerPackages: false });
import { withPayload } from "@payloadcms/next/withPayload";

const nextConfig = {
// Your Next.js config here
};
export default withPayload(nextConfig, { devBundleServerPackages: false });
Error:
Task dev next dev
error: Uncaught (in promise) TypeError: Relative import path "@payloadcms/next/withPayload" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add npm:@payloadcms/next/withPayload`
at file:///home/djkato/data/Code/backend/next.config.mjs:1:29
at async loadConfig (file://...dist/server/config.js:964:36)
at async getStartServerInfo (file:///.../next/15.2.3/dist/server/lib/app-info-log.js:95:5)
at async ServerImpl.<anonymous> (file:///.../next/15.2.3/dist/server/lib/start-server.js:232:41)
Task dev next dev
error: Uncaught (in promise) TypeError: Relative import path "@payloadcms/next/withPayload" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add npm:@payloadcms/next/withPayload`
at file:///home/djkato/data/Code/backend/next.config.mjs:1:29
at async loadConfig (file://...dist/server/config.js:964:36)
at async getStartServerInfo (file:///.../next/15.2.3/dist/server/lib/app-info-log.js:95:5)
at async ServerImpl.<anonymous> (file:///.../next/15.2.3/dist/server/lib/start-server.js:232:41)
I assume this is something to do with import/importMaps but I tried different combinations and it's failing still. How do I fix this?
2 replies
CDCloudflare Developers
Created by Djkáťo on 11/25/2024 in #general-help
CF Pages: updating page via gh push adds CORS issues, breaks audioplayback / file serving
No description
8 replies
CDCloudflare Developers
Created by Djkáťo on 12/27/2023 in #general-help
pfsense ddns domain not working
Hello, set up cf ddns with pfsense, and the IP adresses always match, but the domain access says connection timed out, even tho when I take the ip from cf dashboard of that domain it works when connecting directly to that IP. Both have proxy mode on, and pfsense says the connection is working.
6 replies
CDCloudflare Developers
Created by Djkáťo on 10/9/2023 in #general-help
Embed Iframe of one subdomain inside another
Heyo, I'm trying to iframe embed content from one subdomain inside another, eg. embed mail-app.site.co inside admin.site.co. The admin uses iframe properties sandbox="allow-same-origin allow-forms allow-scripts". Is there a way to make this work? I found that document.domain used to be a way (now deprecated), but in my case both sites are in a subdomain, so I'm not sure how that'd work. I also found something mentioning Content-Security-Policy: frame-ancestors 'self' *.site.co, but I'm not sure how this works with the allow-same-origin sandbox property. Anyone got any clues ? :)
2 replies