serverless / serverless-plugin-typescript

Serverless plugin for zero-config Typescript support
MIT License
784 stars 224 forks source link

[BUG] Not able to deploy with serverless v2. #293

Closed vansham69420 closed 1 year ago

vansham69420 commented 1 year ago

Environment Information -

Framework Version:         2.35.0
Plugin Version:            4.6.0
SDK Version:               4.3.2
Components Version:        3.18.2

Command run -

SLS_DEBUG=* serverless deploy --stage dev --aws-profile dev --profile dev --verbose

Command output -

Error ---------------------------------------------------

  Error: ENOENT: no such file or directory, stat '/home/circleci/cropwise-hedging/node_modules/.bin/ts-node-cwd'
      at Object.statSync (fs.js:1132:3)
      at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/graceful-fs/polyfills.js:319:16)
      at Object.statSync (/home/circleci/cropwise-hedging/node_modules/graceful-fs/polyfills.js:308:16)
      at checkStats (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:171:22)
      at checkPaths (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:183:31)
      at copyDirItem (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:117:20)
      at /home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:111:39
      at Array.forEach (<anonymous>)
      at copyDir (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:111:23)
      at mkDirAndCopy (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:106:3)
      at onDir (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:97:37)
      at getStats (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:43:37)
      at startCopy (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:36:10)
      at copyDirItem (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:118:10)
      at /home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:111:39
      at Array.forEach (<anonymous>)
      at copyDir (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:111:23)
      at mkDirAndCopy (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:106:3)
      at onDir (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:97:37)
      at getStats (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:43:37)
      at startCopy (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:36:10)
      at Object.copySync (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/node_modules/fs-extra/lib/copy-sync/copy-sync.js:31:10)
      at TypeScriptPlugin.<anonymous> (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/dist/src/index.js:174:20)
      at Generator.next (<anonymous>)
      at /home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/dist/src/index.js:7:71
      at new Promise (<anonymous>)
      at __awaiter (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/dist/src/index.js:3:12)
      at TypeScriptPlugin.copyDependencies (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/dist/src/index.js:166:16)
      at TypeScriptPlugin.<anonymous> (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/dist/src/index.js:44:28)
      at Generator.next (<anonymous>)
      at fulfilled (/home/circleci/cropwise-hedging/node_modules/serverless-plugin-typescript/dist/src/index.js:4:58)
      at processTicksAndRejections (internal/process/task_queues.js:95:
medikoo commented 1 year ago

@vansham69420 v2 is no longer maintained, please switch to v3

medikoo commented 1 year ago

Nonetheless, error you've posted doesn't seem to be related to the Framework, it rather shows some issue in your setup