npm - ExperimentalWarning : The fs. promise API 是实验性的

标签 npm autorest

我是 Node 和 npm 的新手,并试图了解 AutoRest。

当我输入时

autorest --list-available

进入powershell ISE 我明白

AutoRest code generation utility [version: 2.0.4262; node: v10.1.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
autorest : (node:12580) ExperimentalWarning: The fs.promises API is experimental
At line:1 char:1
+ autorest --list-available
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: ((node:12580) Ex...is experimental:String) [], RemoteExc 
   eption
    + FullyQualifiedErrorId : NativeCommandError

 Extension Name                 Version       

 @microsoft.azure/autorest-core 2.0.4278       
 @microsoft.azure/autorest-core 2.0.4277       
 @microsoft.azure/autorest-core 2.0.4276       
 @microsoft.azure/autorest-core 2.0.4275       
 @microsoft.azure/autorest-core 2.0.4274       
 @microsoft.azure/autorest-core 2.0.4272       
 @microsoft.azure/autorest-core 2.0.4271       
 @microsoft.azure/autorest-core 2.0.4269       
 @microsoft.azure/autorest-core 2.0.4263       
 @microsoft.azure/autorest-core 2.0.4262       
Failure:
TypeError: volume[member].bind is not a function
TypeError: volume[member].bind is not a function
    at patchFilesystem 
(C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:277:43)
    at C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:281:18
    at Object.global.staticloader.undo 
(C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:163:7)
    at process.exit.n [as exit] 
(C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:170:27)
    at main (C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\app.js:153:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:12580) UnhandledPromiseRejectionWarning: Error: EBADF: bad file descriptor, close
    at Object.fs.closeSync (fs.js:529:3)
    at StaticVolumeFile.shutdown 
(C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:352:10)
    at StaticFilesystem.shutdown 
(C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:406:17)
    at process.exit.n [as exit] 
(C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:169:11)
    at main (C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\app.js:239:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:12580) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated 
either by throwing inside of an async function without a catch block, or by rejecting a promise 
which was not handled with .catch(). (rejection id: 1)
(node:12580) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the 
future, promise rejections that are not handled will terminate the Node.js process with a non-zero 

发生什么事了? 退出代码。

最佳答案

更新到最新的节点版本 (v12.6+) 会删除警告。

关于npm - ExperimentalWarning : The fs. promise API 是实验性的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50441890/

相关文章:

visual-studio-2017 - 为什么 Visual Studio 2017 无法为 Swagger Petstore 生成 REST API 客户端?

linux - 对 Node JS 中的 NPM 进行故障排除

npm - 我应该如何找出npm软件包的最新稳定版本?

javascript - 有哪些选项可用于定义具有 node.js 依赖项的 Python 包?

javascript - Gulp - 按文件夹制作 Sprite

c# - Autorest + Swagger 无法正确生成 ENUM

c# - 如何将 HttpClientFactory 与 AutoRest 生成的客户端一起使用

当包具有公共(public)依赖项时,私有(private)包的 npm 安装失败

c# - 使用 Swagger 命名 AutoRest 生成的方法名称

swagger - Autorest 错误 - swagger.json' 不是有效的 OpenAPI 2.0 定义(预期为 'swagger: 2.0')