hyperbrew / bolt-cep

A lightning-fast boilerplate for building Adobe CEP Extensions in React, Vue, or Svelte built on Vite + TypeScript + Sass
MIT License
315 stars 40 forks source link

failed to load config from vite.config.ts #91

Closed Jalan-Ember-SN closed 1 year ago

Jalan-Ember-SN commented 1 year ago

Hello, I added this as a comment here https://github.com/hyperbrew/bolt-cep/issues/78#issuecomment-1646259308 but am opening it's own issue as I am not sure if it a separate problem! copy pasting what I wrote there

" Hi! I was having this issue and tried running yarn add vite-cep-plugin and then yarn build again. However it failed with the following error:

failed to load config from C:\[...]\vite.config.ts
error during build:
TypeError: Cannot destructure property 'iife' of 'undefined' as it is undefined.
    at jsxInclude (C:\[project folder]\node_modules\vite-cep-plugin\lib\index.js:338:23)
    at extendscriptConfig (C:\[project folder]\vite.config.ts:142:45)   
    at Object.<anonymous> (C:\[project folder]\vite.config.ts:233:1)    
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at require.extensions.<computed> [as .ts] (C:\[project folder]\node_modules\vite\dist\node\chunks\dep-6e2fe41e.js:62006:20)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at loadConfigFromBundledFile (C:\[project folder]\node_modules\vite\dist\node\chunks\dep-6e2fe41e.js:62014:17)
error Command failed with exit code 1.

I thought perhaps some other packages could be out of date so tried running yarn upgrade but that didn't seem to help. I am not sure what to make of this. Any thoughts appreciated! "

My next step is to port the project to a fresh install of Bolt CEP but that will be time consuming and have its own host of challenges I'm sure :)

justintaylor-dev commented 1 year ago

Make sure you've followed all the upgrade steps in the readme:

https://github.com/hyperbrew/bolt-cep#misc-troubleshooting

Jalan-Ember-SN commented 1 year ago

I followed those steps and then encountered a new error relating to rimraf. with some help from another developer I was able to get up and running again. The steps:

after these steps, yarn build completed successfully and I was able to run the extension in dev mode again 😄

justintaylor-dev commented 1 year ago

Glad to hear it's working, likely since you ran yarn upgrade you had a bunch of stuff that was now longer compatible and needed tweaking.