# The UDT "react-starter" plugin template does not properly build

**URL:** <https://forums.creativeclouddeveloper.com/t/the-udt-react-starter-plugin-template-does-not-properly-build/5722>\
**Category:** UXP Developer Tool\
**Created:** [January 19, 2023, 9:09pm UTC](https://forums.creativeclouddeveloper.com/t/the-udt-react-starter-plugin-template-does-not-properly-build/5722 "2023-01-19T21:09:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forums.creativeclouddeveloper.com/u/rascheln)\
**Post date:** [January 19, 2023, 9:09pm UTC](https://forums.creativeclouddeveloper.com/t/the-udt-react-starter-plugin-template-does-not-properly-build/5722/1 "2023-01-19T21:09:42Z")

</div>

I am running into issues getting the `react-starter` template working. I have checked other threads on similarly-named issues already, and I did not see anything that applied to my particular case:

I am on Mac OS Ventura 13.1.  
These are the steps that are creating the problem:

- Open UDT, create a new plugin, select `react-starter`.
- Set all the appropriate names of the project, set the target version of photoshop to my current one.
- I go into the `readme.md` in the directory. My npm version is 8.19.2. My node version is v18.12.1.
- I check to make sure that the terminal is in the root of the directory, and then type `npm install`.
- I have 6 high-severity vulnerabilities after running it. I am opting out of using `npm audit fix --force` as it may introduce some breaking changes, and I am trying to minimize the number of possible ways that this program might break via deviating from the instructions.

I believe the readme is incorrect when recommending that I type `npm build`. When I do that, I get the error:

```auto
Unknown command: "build"

Did you mean this?
    npm run build # run the "build" package script

```

- So I type `npm run build`, which produces another error:

```auto
opensslErrorStack: ['error:03000086:digital envelope routines::initialization error'],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'

```

I understand the importance of reading the documentation, and that’s what I’ve been extensively doing, but it seems that the documentation is incorrect, here, as I am unable to get the basic template running, following the instructions of the `readme.md` exactly.

What is causing this to break?

One of the things I tried: run `npm audit fix --force` anyway, which produces the following error:

```auto
npm ERR! Invalid Version: npm:acorn-with-stage3

```

I am out of ideas, as google searches yield scarce results. I am also using the book “Adobe UXP Plugins Development with React JS” by Davide Barranca, including reading his blog and reading into possible breaking changes between Manifest V4 and V5. Specifically, the way `show()` is handled.

> **[Adobe UXP: Things you need to know! #13 Manifest v5 | Davide Barranca](https://www.davidebarranca.com/development/adobe-uxp-things-you-need-to-know-manifest-5)**
>
> UXP has updated the Manifest to version 5, let's have a look at what this actually means for your Photoshop plugins.

I read through this link and it looks like react-starter has been updated and no longer reflects things that would have broken, so I am guessing that it does not relate to this.

So, I am thoroughly out of ideas. My goal is to just get the `react-starter` template working as intended, so that I can have an empty framework.

Should I, instead, use a different starter template?

---

<div class="post-metadata">

**Author:** ![cameronmcefee](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/cameronmcefee/32/2173_2.png) [@cameronmcefee](https://forums.creativeclouddeveloper.com/u/cameronmcefee)\
**Post date:** [January 19, 2023, 11:44pm UTC](https://forums.creativeclouddeveloper.com/t/the-udt-react-starter-plugin-template-does-not-properly-build/5722/2 "2023-01-19T23:44:47Z")

</div>

This issue smells like a local configuration issue rather than something that is wrong with the sample project. AKA, it’s unfortunately probably a your-computer problem and not one with the sample. SSL _shouldn’t_ have anything to do with the project as it’s a protocol for HTTP stuff or maybe the innerworkings of the build system, not the project itself.

A quick google of the SSL error pulled up this: [Webpack build failing with ERR\_OSSL\_EVP\_UNSUPPORTED - Stack Overflow](https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported). It may or may not be related, but if you’re on a bleeding edge version of node, you might want to switch to something like Node 16 or 14 and see if things work better.

Ideally you shouldn’t have to change Node versions to have a stable environment, but I’ve had enough issues with Node 17 that I avoid it. I pacify my frustrations by considering the versions of Node that hosts like Vercel or GitHub actions set as their defaults. Vercel doesn’t even support Node 17 and they only [switched to Node 18 last November](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js).

Alternatively, if you live a life where you can easily do a fresh install of your machine within an hour (a good skill and workflow setup to have as a developer), you can try starting with a blank slate and see if that resolves unexpected issues. This isn’t generally something you’ll want to do as it’s time consuming and destructive. However, if you’re in the “I run what stack overflow tells me to run” stage of your journey, it’s easy to accidentally sudo yourself into environment hell and some times a scorched earth approach is the cleanest one.

But definitely try to troubleshoot before you burn things down.

Good luck!

---

<div class="post-metadata">

**Author:** ![rascheln](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rascheln](https://forums.creativeclouddeveloper.com/u/rascheln)\
**Post date:** [January 20, 2023, 12:43am UTC](https://forums.creativeclouddeveloper.com/t/the-udt-react-starter-plugin-template-does-not-properly-build/5722/3 "2023-01-20T00:43:44Z")

</div>

Hello and thanks for the prompt reply! I looked more into the problem, and it seems that the issue was with the included `webpack.config.js` configuration file. I am not sure what caused the original error, but I was also getting this error:

```auto
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.devtool should match pattern "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$".
   BREAKING CHANGE since webpack 5: The devtool option is more strict.
   Please strictly follow the order of the keywords in the pattern.

```

Within the included webpack.config.js file, there’s the line:  
`devtool: 'cheap-eval-source-map'`  
which was out of order. I changed it to:  
`devtool: 'eval-cheap-source-map'`  
which allowed me to build everything with the latest npm version and following all the semantic versioning in the `package.json` file. After messing with `nvm` earlier, and changing specific versions of dependencies, I was unable to reproduce the openSSL error, but swapping the order in the `devtool:` instructions allowed for a successful build.

Now, I am able to run the panel as intended (as far as I can tell). One panel has a “Hello, there” play button, and the other panel has some RGB sliders. I did not use `npm audit fix` or any of the variants, opting to just leave things as is.

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [March 2, 2023, 11:46am UTC](https://forums.creativeclouddeveloper.com/t/the-udt-react-starter-plugin-template-does-not-properly-build/5722/4 "2023-03-02T11:46:34Z")

</div>

Thanks for the pointers @rascheln & @cameronmcefee; I had the same issues.  
The reason it doesn’t build is that Node 17 made some changes to SSL that the version of Webpack the React starter comes with doesn’t play nice with. Update Webpack to the latest version and make the quoted change to the `webpack.config.js and it’s all fixed.

> [@rascheln](#):
>
> devtool: ‘eval-cheap-source-map’

I wouldn’t recommend downgrading Node - the patched SSL for a reason! 😅
