windows下yarn build报错[DEP0111] DeprecationWarning: Access to process.binding('async_wrap') is deprecated解决

今天做项目,操作系统为win10,执行yarn build的时候出现报错:[DEP0111] DeprecationWarning: Access to process.binding(‘async_wrap’) is deprecated。

先是有一个弹窗报错信息:

Expression:thread_id_key != 0x7777

fibers\bin\win32-x64-93\fibers.node
File:coroutine.cc Line:134

...

//bulabula之类的

忽略后在命令窗口出现报错,完整报错信息如下:

ERROR  (node:24616) [DEP0111] DeprecationWarning: Access to process.binding('async_wrap') is deprecated.     10:40:33
(Use `node --trace-deprecation ...` to show where the warning was created)

Exception in PromiseRejectCallback:
D:\phpstudy_pro\WWW\my\xdshop\pc\node_modules\sass-loader\dist\index.js:82
}
^

RangeError: Maximum call stack size exceeded
Exception in PromiseRejectCallback:
node:internal/process/task_queues:96
    runMicrotasks();
    ^

RangeError: Maximum call stack size exceeded


#
# Fatal error in , line 0
# Check failed: static_cast<uintptr_t>(caller_frame_top_) > stack_guard->real_jslimit().
#
#
#
#FailureMessage Object: 000000F0F48FED60
 1: 00007FF61464B05F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+111311
 2: 00007FF61456B2DF v8::CFunction::ReturnInfo+2111
 3: 00007FF61527C452 V8_Fatal+162
 4: 00007FF614E5A0A9 v8::internal::Deoptimizer::DeoptimizeAll+12153
 5: 00007FF614F79B6E v8::internal::SetupIsolateDelegate::SetupHeap+45166
 6: 00007FF614F7608F v8::internal::SetupIsolateDelegate::SetupHeap+30095
 7: 000002238464AB89
error Command failed with exit code 3221225477.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

查了一些资料也没有解决,因为之前环境出现过缺少VS环境gyp ERR! find VS报错,所以猜想可能是因为VS环境和node.js版本不匹配,出现的兼容问题。

解决过程:

1.卸载node.js,我安装的是最新版(最新版为16.5.0版)。
2.重装node.js
选择node.js的LTS版本,我安装的时候LTS长期支持版是14.17.3版,安装过程中勾选“自动安装依赖工具”选项。

安装完毕后执行yarn installyarn build成功。

心得:遇到不懂的、解决不了的问题,先不要心急,思考可能会出现问题的地方,多尝试。

出处:www.l1mn.com

原文标题:windows下yarn build报错[DEP0111] DeprecationWarning: Access to process.binding('async_wrap') is deprecated解决

原文地址:https://www.l1mn.com/p/ur43n4.html

本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。

评论

皖ICP备2023023451号

Copyright © L1MN.COM 联系方式:l1mnfw@163.com