Hi, I’m setup deployment for multiple environment. I had read about post about this. I tried setup staging tag into latest version of plasmic.
In my project, I setup version in initPlasmicLoader as below:
export const PLASMIC = initPlasmicLoader({
projects: [
{
id: 'xxx', // ID of a project you are using
token:
'yyy', // API token for that project
version: 'staging',
},
],
// Fetches the latest revisions, whether or not they were unpublished!
// Disable for production to ensure you render only published changes.
preview: isProduction ? false : true,
});
But when build (nextjs project use yarn build), i got a error:
main:build:
main:build: > Build error occurred
main:build: Error: Error fetching loader data: Internal Server Error
main:build: at r.fetchLoaderData (/Users/sanphan/workspaces/transaction-web/node_modules/@plasmicapp/loader-fetcher/dist/loader-fetcher.cjs.production.min.js:1:799)
main:build: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
main:build: at async exports.PlasmicModulesFetcher.doFetch (/Users/sanphan/workspaces/transaction-web/node_modules/@plasmicapp/loader-fetcher/dist/loader-fetcher.cjs.production.min.js:1:2454)
main:build: at async exports.PlasmicModulesFetcher.getCachedOrFetch (/Users/sanphan/workspaces/transaction-web/node_modules/@plasmicapp/loader-fetcher/dist/loader-fetcher.cjs.production.min.js:1:2380)
main:build: at async exports.PlasmicModulesFetcher.fetchAllData (/Users/sanphan/workspaces/transaction-web/node_modules/@plasmicapp/loader-fetcher/dist/loader-fetcher.cjs.production.min.js:1:2084) {
main:build: type: 'Error'
main:build: }
Can someone help me out! I’m trying to setup demo for my team about use plasmic in production. Thank you!