#node.js #amazon-dynamodb #serverless
#node.js #amazon-dynamodb #бессерверный
Вопрос:
Я получаю ошибку типа при инициализации в бессерверном-dynamodb-local/index.js:11:43.
Как я могу исправить эту проблему?
directory (my-git-branch) > serverless
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^1.83.2")
Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command upgrade
Serverless: Load command uninstall
Type Error ---------------------------------------------
TypeError: Class extends value undefined is not a constructor or null
at new module.exports (/home/myFolder/node_modules/serverless-dynamodb-local/index.js:11:43)
at PluginManager.addPlugin (/home/myFolder/node_modules/serverless/lib/classes/PluginManager.js:94:28)
at /home/myFolder/node_modules/serverless/lib/classes/PluginManager.js:129:31
at Array.forEach (<anonymous>)
at PluginManager.loadAllPlugins (/home/myFolder/node_modules/serverless/lib/classes/PluginManager.js:129:8)
at /home/myFolder/node_modules/serverless/lib/Serverless.js:88:39
at tryCatcher (/home/myFolder/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/myFolder/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/myFolder/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/myFolder/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/myFolder/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/myFolder/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._settlePromise (/home/myFolder/node_modules/bluebird/js/release/promise.js:617:21)
at Promise._settlePromise0 (/home/myFolder/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/myFolder/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/myFolder/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/home/myFolder/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/home/myFolder/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/home/myFolder/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/myFolder/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/myFolder/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/myFolder/node_modules/bluebird/js/release/promise.js:673:18)
at PromiseArray._resolve (/home/myFolder/node_modules/bluebird/js/release/promise_array.js:127:19)
at PromiseArray._promiseFulfilled (/home/myFolder/node_modules/bluebird/js/release/promise_array.js:145:14)
at Promise._settlePromise (/home/myFolder/node_modules/bluebird/js/release/promise.js:609:26)
at Promise._settlePromise0 (/home/myFolder/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/myFolder/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/myFolder/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/home/myFolder/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/home/myFolder/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/home/myFolder/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/myFolder/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/myFolder/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/home/myFolder/node_modules/bluebird/js/release/promise.js:673:18)
at PropertiesPromiseArray.PromiseArray._resolve (/home/myFolder/node_modules/bluebird/js/release/promise_array.js:127:19)
at PropertiesPromiseArray._promiseFulfilled (/home/myFolder/node_modules/bluebird/js/release/props.js:78:14)
at Promise._settlePromise (/home/myFolder/node_modules/bluebird/js/release/promise.js:609:26)
at Promise._settlePromise0 (/home/myFolder/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/myFolder/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/home/myFolder/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/myFolder/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/myFolder/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/myFolder/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:461:21)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.20.1
Framework Version: 2.18.0
Plugin Version: 4.4.2
SDK Version: 2.3.2
Components Version: 3.4.7
Ответ №1:
Как описано в этом выпуске, удаление и повторная установка serverless решили проблему для меня:
sudo npm uninstall -g serverless
sudo npm i -g serverless
npm i -D serverless-offline