我\xe2\x80\x99m 只是尝试使用 @sentry/nextjs 和哨兵向导将哨兵与 NextjS v12 集成,在本地主机上和集成哨兵之前一切都很好,但是当我在 AWS Amplify 上构建应用程序时,启动时构建出错SSR 构建存在多个有关未找到模块的错误:Can\xe2\x80\x99t 解析 \xe2\x80\x98webpack\xe2\x80\x99。
\n构建有什么问题?有什么解决办法吗?我尝试了多种选项,例如在 next.config.js 上添加 target: \xe2\x80\x98experimental-serverless-trace\xe2\x80\x99 但没有运气。
\n感谢你的帮助!
\n\n我有时间选项可以导出到名为 TimeOptions 的特定文件,其中我有这样的Intl.DateFormat
代码
当我将文件从TimeOptions
to重命名时timeOptions
,VercelType error: Cannot find module '../utils/timeOptions' or its corresponding type declarations.
在构建时告诉了这一点。
当我在本地使用 构建它时next build
,结果看起来不错,没有错误。
你知道发生了什么事吗?我曾尝试tsconfig.js
按照其他线程中提到的方式进行设置,但在 Vercel 上似乎没有任何效果。
非常感谢您的帮助。
我正在修改UIView高度的约束,包括nameTextField和使用SnapKit的superView inputContainerView.我安排nameTextField的高度等于inputContainerView的高度的三分之一.我的目的是在按下SegmentedControl时删除nameTextField.当我尝试修改常量时,它工作得很好.但是当我尝试将乘数高度值从(1/3)修改为0时,有时它会崩溃,有时我写的其他textField(passwordTextField和emailTextField)也会消失.我正在使用updateContraint来更新一些约束.我该如何解决这个问题?谢谢
inputContainerView.snp.makeConstraints { (make) in
make.centerX.equalTo(view.snp.centerX)
make.centerY.equalTo(view.snp.centerY)
// constraintAnchor is equal to offset
make.width.equalTo(view.snp.width).offset(-24)
make.height.equalTo(150)
}
// constraint for nameTextField
inputContainerView.addSubview(nameTextField)
//x y width height constraint using Snap Kit
nameTextField.snp.makeConstraints { (make) in
make.left.equalTo(inputContainerView.snp.left).offset(12)
make.top.equalTo(inputContainerView.snp.top)
make.width.equalTo(inputContainerView.snp.width)
make.height.equalTo(inputContainerView.snp.height).multipliedBy(0.333)
}
func handleLoginRegisterChange() {
let title = loginRegisterSegmentedControl.titleForSegment(at: loginRegisterSegmentedControl.selectedSegmentIndex)
loginRegisterButton.setTitle(title, for: .normal)
// change height of inputcontainerview
if loginRegisterSegmentedControl.selectedSegmentIndex == 0 {
inputContainerView.snp.updateConstraints({ (update) in
update.height.equalTo(100)
})
nameTextField.snp.remakeConstraints({ (remake) in
remake.height.equalTo(inputContainerView.snp.height).multipliedBy(0)
})
} else if loginRegisterSegmentedControl.selectedSegmentIndex == 1 {
inputContainerView.snp.updateConstraints({ (update) in …
Run Code Online (Sandbox Code Playgroud) swift ×2
aws-amplify ×1
ios ×1
next.js ×1
reactjs ×1
sentry ×1
snapkit ×1
typescript ×1
uiview ×1
vercel ×1