hyperbrew / bolt-cep

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

Running yarn build on new project yeilds errors #54

Closed itsalexjones closed 1 year ago

itsalexjones commented 1 year ago

Hi Team,

Firstly, thanks for putting this project together. It should accelerate my development massively.

Unfortunately I'm reasonably new to the various JS buid systems and also having some issues getting my project built for the first time. If I create a new project using yarn create bolt-cep aud-zetta-panel --template react and then run yarn then yarn build the build fails with a number of errors (below)

Being new to this particular set of build systems, I'm not 100% sure on where to start. Any advice would be greatly recieved.

Thanks, Alex


➜  aud-zetta-panel yarn
yarn install v1.22.19
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning @rollup/plugin-commonjs > magic-string > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
warning babel-preset-env > babel-plugin-transform-es2015-arrow-functions > babel-runtime > core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > babel-plugin-transform-scss@1.1.0" has unmet peer dependency "path@^0.12.7".
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
✨  Done in 37.52s.
➜  aud-zetta-panel yarn build
yarn run v1.22.19
$ rimraf dist/* && tsc && vite build --watch false
src/js/lib/utils.ts:43:30 - error TS2307: Cannot find module '@esTypes/index' or its corresponding type declarations.

43 import type { Scripts } from "@esTypes/index";
                                ~~~~~~~~~~~~~~~~

src/js/lib/utils.ts:73:21 - error TS2344: Type 'Func' does not satisfy the constraint 'Function'.

73   ...args: ArgTypes<Func>
                       ~~~~

src/js/lib/utils.ts:74:23 - error TS2344: Type 'Func' does not satisfy the constraint 'Function'.

74 ): Promise<ReturnType<Func>> => {
                         ~~~~

src/js/main/main.tsx:34:24 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

34     evalTS("helloStr", "test").then((res) => {
                          ~~~~~~

src/js/main/main.tsx:37:24 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'never'.

37     evalTS("helloNum", 1000).then((res) => {
                          ~~~~

src/js/main/main.tsx:40:29 - error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'never'.

40     evalTS("helloArrayStr", ["ddddd", "aaaaaa", "zzzzzzz"]).then((res) => {
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/js/main/main.tsx:43:24 - error TS2345: Argument of type '{ height: number; width: number; }' is not assignable to parameter of type 'never'.

43     evalTS("helloObj", { height: 90, width: 100 }).then((res) => {
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~

src/js/main/main.tsx:45:23 - error TS2339: Property 'x' does not exist on type 'never'.

45       console.log(res.x);
                         ~

src/js/main/main.tsx:46:23 - error TS2339: Property 'y' does not exist on type 'never'.

46       console.log(res.y);
                         ~

src/js/main/main.tsx:48:26 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

48     evalTS("helloError", "test").catch((e) => {
                            ~~~~~~

Found 10 errors in 2 files.

Errors  Files
     3  src/js/lib/utils.ts:43
     7  src/js/main/main.tsx:34
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
justintaylor-dev commented 1 year ago

This has been resolved in 1.0.2 released this morning. Thanks!

If you're interested in chatting on getting started with Bolt CEP, feel free to join our Discord: https://discord.gg/BjPYRKUq

itsalexjones commented 1 year ago

Wonderful, thanks!