下一个js应用程序在Arch Linux上启动dev服务器时创建错误

nnvyjq4y  于 2023-03-22  发布在  Linux
关注(0)|答案(2)|浏览(132)

当我运行yarn run dev来运行下一个应用程序时,我遇到了错误。不过React js项目运行得很好。
我尝试过什么:

  • 重新安装nodejs。
  • 使用Windows(在Windows上运行良好)

以下是控制台输出:

> next-cafegent@0.1.0 dev
> next dev

node[61231]: ../src/module_wrap.cc:599:v8::MaybeLocal<v8::Promise> node::loader::ImportModuleDynamically(v8::Local<v8::Context>, v8::Local<v8::Data>, v8::Local<v8::Value>, v8::Local<v8::String>, v8::Local<v8::FixedArray>): Assertion `(it) != (env->id_to_function_map.end())' failed.
 1: 0x7f60cea96e8d node::Abort() [/usr/bin/../lib/libnode.so.111]
 2: 0x7f60cea971d6 node::Assert(node::AssertionInfo const&) [/usr/bin/../lib/libnode.so.111]
 3: 0x7f60cea49a4d  [/usr/bin/../lib/libnode.so.111]
 4: 0x7f60cefd847a v8::internal::Isolate::RunHostImportModuleDynamicallyCallback(v8::internal::MaybeHandle<v8::internal::Script>, v8::internal::Handle<v8::internal::Object>, v8::internal::MaybeHandle<v8::internal::Object>) [/usr/bin/../lib/libnode.so.111]
 5: 0x7f60cf412b18 v8::internal::Runtime_DynamicImportCall(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/../lib/libnode.so.111]
 6: 0x7f60ced5a5f4  [/usr/bin/../lib/libnode.so.111]
zsh: IOT instruction (core dumped)  npm run dev
wbgh16ku

wbgh16ku1#

在linux中切换到nodejs的稳定版本,现在是18.15.0

nvm install 18.15.0 && nvm use 18.15.0

这应该解决了错误,它在我的笔记本电脑上工作。我希望它能帮助你!

aurhwmvo

aurhwmvo2#

更改为稳定版本修复了该问题。

相关问题