Prisma 入门 - 从头开始​​完成失败 - hello-prisma

Posted

技术标签:

【中文标题】Prisma 入门 - 从头开始​​完成失败 - hello-prisma【英文标题】:Prisma getting started - start from scratch complete FAIL - hello-prisma 【发布时间】:2021-07-24 04:15:42 【问题描述】:

好的 Prisma 新手 我按照入门如何从头开始设置说明@https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-node-mysql

是的 - 我的 nodejs v v 16.0.0 和 mariadb v 10 运行良好。

我可以毫无错误地创建表,并且可以使用我首选的 mariadb 客户端 Navicat 在数据库中查看它们。

但是,当我尝试按照说明添加记录时,我的节点 index.js 会产生以下终端,其中充满了令人不快的错误。

在我将 Prisma 放回潘多拉魔盒之前,谁能解释一下问题所在?

node index.js    
C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe[4100]: 
c:\ws\src\node_http_parser.cc:567: Assertion `args[3]->IsInt32()' 
failed.
1: 00007FF7712486BF 
v8::internal::Isolate::ArchiveSpacePerThread+4719
2: 00007FF7711DB246 
v8::internal::wasm::WasmCode::safepoint_table_offset+67414
3: 00007FF7711DB5C1 
v8::internal::wasm::WasmCode::safepoint_table_offset+68305
4: 00007FF7711C0543 v8::base::CPU::has_sse+14915
5: 00007FF771B03969 v8::internal::Builtins::builtin_handle+318073
6: 00007FF771B02F01 v8::internal::Builtins::builtin_handle+315409
7: 00007FF771B031F1 v8::internal::Builtins::builtin_handle+316161
8: 00007FF771B03033 v8::internal::Builtins::builtin_handle+315715
9: 00007FF771BD98B1 
v8::internal::SetupIsolateDelegate::SetupHeap+455217
10: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
11: 00007FF771B70DFF 
v8::internal::SetupIsolateDelegate::SetupHeap+26495
12: 00007FF771C653DA 
v8::internal::SetupIsolateDelegate::SetupHeap+1027418
13: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
14: 00007FF771B739B9                     
v8::internal::SetupIsolateDelegate::SetupHeap+37689
15: 00007FF771B739B9     
v8::internal::SetupIsolateDelegate::SetupHeap+37689
16: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
17: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
18: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
19: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
20: 00007FF771C1FA48 
v8::internal::SetupIsolateDelegate::SetupHeap+742344
21: 00007FF771B70FCC 
v8::internal::SetupIsolateDelegate::SetupHeap+26956
22: 00007FF771C653DA 
v8::internal::SetupIsolateDelegate::SetupHeap+1027418
23: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
24: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
25: 00007FF771B9FCB3 
v8::internal::SetupIsolateDelegate::SetupHeap+218675
26: 00007FF771C213A5 
v8::internal::SetupIsolateDelegate::SetupHeap+748837
27: 00007FF771B93513 
v8::internal::SetupIsolateDelegate::SetupHeap+167571
28: 00007FF771B71B0B 
v8::internal::SetupIsolateDelegate::SetupHeap+29835
29: 00007FF771A2A0E3 v8::internal::Execution::CallWasm+1891
30: 00007FF771A2A1EB v8::internal::Execution::CallWasm+2155      
31: 00007FF771A2AC5A v8::internal::Execution::TryCall+378        
32: 00007FF771A07945 v8::internal::MicrotaskQueue::RunMicrotasks+501
33: 00007FF771A076A0 
v8::internal::MicrotaskQueue::PerformCheckpoint+32
34: 00007FF771B03969 v8::internal::Builtins::builtin_handle+318073
35: 00007FF771B02F01 v8::internal::Builtins::builtin_handle+315409
36: 00007FF771B031F1 v8::internal::Builtins::builtin_handle+316161
37: 00007FF771B03033 v8::internal::Builtins::builtin_handle+315715
38: 00007FF771BD98B1 
v8::internal::SetupIsolateDelegate::SetupHeap+455217
39: 00007FF771B739B9 
v8::internal::SetupIsolateDelegate::SetupHeap+37689
40: 00007FF771B71C0F 
v8::internal::SetupIsolateDelegate::SetupHeap+30095
41: 00007FF771B7180B 
v8::internal::SetupIsolateDelegate::SetupHeap+29067
42: 00007FF771A2A022 v8::internal::Execution::CallWasm+1698      
43: 00007FF771A2985F v8::internal::Execution::Call+191
44: 00007FF771B30EF1 v8::Function::Call+609
45: 00007FF771277878 node::CallbackScope::~CallbackScope+888     
46: 00007FF771277BEB node::CallbackScope::~CallbackScope+1771    
47: 00007FF77126F714 
v8::internal::compiler::Operator::EffectOutputCount+228
48: 00007FF7710F9A53 RSA_meth_get_flags+20675
49: 00007FF7710FA5CD RSA_meth_get_flags+23613
50: 00007FF7710F4EF9 RSA_meth_get_flags+1385
51: 00007FF771299E62 uv_thread_self+3986
52: 00007FF77129CBEF uv_pipe_pending_type+3359
53: 00007FF7712A798C uv_loop_init+940
54: 00007FF7712A7C8A uv_run+202
55: 00007FF771276F64 node::SpinEventLoop+308
56: 00007FF771193F53 v8::internal::UnoptimizedCompilationInfo::fe57: 
\00007FF77120E387 node::Start+215
58: 00007FF77103822C RC4_options+346412
59: 00007FF7720F931C v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+151692
60: 00007FFF16247034 BaseThreadInitThunk+20
61: 00007FFF16E82651 RtlUserThreadStart+33
PS D:\########\hello-prisma>

【问题讨论】:

【参考方案1】:

在 Github https://github.com/prisma/prisma/discussions/6881 上提出同样的问题后

我收到了以下解决方案

将节点降级为 LTS = 在我的情况下是不可能的!

或将 Prisma 升级到开发版

纱线添加@prisma/client@dev prisma@dev

显然这将包含在下一个 Prisma 版本中。

【讨论】:

以上是关于Prisma 入门 - 从头开始​​完成失败 - hello-prisma的主要内容,如果未能解决你的问题,请参考以下文章

Prisma 绑定无法连接到 prisma 服务器。请求 http://localhost:4466/ 失败,原因:连接 ECONNREFUSED 127.0.0.1:4466

Prisma 查询解析器失败:“where 选择器的参数无效”

git命令入门

无效的`prisma.mytable.create()`调用:外键约束在字段上失败:使用cockroachdb时`(不可用)`

Prisma 和 Postgres FetchError:对 http://localhost:4466/management 的请求失败

Prisma Playground 中的 React + Apollo“入门”错误