mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
128 stars 120 forks source link

Incompatibility with Node >= v17 #206

Open wetneb opened 2 months ago

wetneb commented 2 months ago

I followed the Getting Started instructions and (after fixing #204) I got the following error:

ERROR in ./src/index.tsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:79:19)
    at Object.createHash (node:crypto:139:10)
    at filename (/home/user/my-plugin/webapp/node_modules/babel-loader/lib/cache.js:94:23)
    at /home/user/my-plugin/webapp/node_modules/babel-loader/lib/cache.js:120:39
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/home/user/my-plugin/webapp/node_modules/babel-loader/lib/cache.js:3:103)
    at _next (/home/user/my-plugin/webapp/node_modules/babel-loader/lib/cache.js:5:194)
    at /home/user/my-plugin/webapp/node_modules/babel-loader/lib/cache.js:5:364
    at new Promise (<anonymous>)
    at /home/user/my-plugin/webapp/node_modules/babel-loader/lib/cache.js:5:97

webpack 5.92.1 compiled with 1 error in 512 ms
make: *** [Makefile:221 : webapp] Erreur 1

Running npm update and npm audit fix --force did not solve the problem.

Node version: v20.15.0 Operating system: debian trixie (testing)

A workaround is to add export NODE_OPTIONS=--openssl-legacy-provider.

It would be great if newer versions of NPM could be supported too.