storyblok / storyblok-fieldtype

Tool for creating custom fieldtypes for Storyblok with babel, browserify and hotreload
12 stars 13 forks source link

Support for node v18 #14

Closed daniel-keller closed 1 year ago

daniel-keller commented 2 years ago

https://www.storyblok.com/docs/plugins/enable-local-dev-mode#how-to-develop-plugins-locally

Following the instructions from the storyblok docs using the latest version of node (v18) results in an error. Installing with node v16 works. Tested on OSX 12.4 (intel x86).

10% building 2/2 modules 0 active
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/Users/dkeller/www/storyblok-fieldtype/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
10% building 2/5 modules 3 active /Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/hot/dev-server.jsnode:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/Users/dkeller/www/storyblok-fieldtype/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/Users/dkeller/www/storyblok-fieldtype/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /Users/dkeller/www/storyblok-fieldtype/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
MalekSmida commented 1 year ago

I have the same problem

bjoernbg commented 1 year ago

Same issue here

johannes-lindgren commented 1 year ago

Hello, excuse us for the late response. We're currently working on a new SDK for field plugins. This includes a new set of starters that are going to replace the one found in this repository. The project is in beta and you can access it here: https://github.com/storyblok/field-plugin. This repository is likely to be archived and to not receive any further updates.