小编Jos*_*a Q的帖子

SvelteKit 无法解决依赖关系,即使它是外部的

我正在制作一个用户身份验证页面,就此而言,我正在使用 bcrypt 进行哈希处理。一切都很好,直到我在代码中实际使用 bcrypt 模块。在开发模式下运行它工作得很好,并且在预览构建时运行得很好,但在构建过程中会发生错误,部署时会导致它停止构建并出错。

\n

这是错误:

\n
> Using @sveltejs/adapter-vercel\n > node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:28: error: Could not resolve "mock-aws-s3" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)\n    43 \xe2\x94\x82     const AWSMock = require('mock-aws-s3');\n       \xe2\x95\xb5                             ~~~~~~~~~~~~~\n\n > node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:76:22: error: Could not resolve "aws-sdk" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)\n    76 \xe2\x94\x82   const AWS = …
Run Code Online (Sandbox Code Playgroud)

bcrypt sveltekit

9
推荐指数
1
解决办法
8055
查看次数

标签 统计

bcrypt ×1

sveltekit ×1