autorest: v2.0.4262
node: v10.1.0 <-- using the latest version I get the exception
using node v8.11.2 the exception is not thrown
The file generation seems to work, but with the latest version I always took this exception:
C:\Users\micde> autorest --version
AutoRest code generation utility [version: 2.0.4262; node: v10.1.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
(node:17240) ExperimentalWarning: The fs.promises API is experimental
Showing All Installed Extensions
Type Extension Name Version Location
core @microsoft.azure/autorest-core 2.0.4278 C:\Users\micde\.autorest\@microsoft.azure_autorest-cor
[email protected]
Failure:
TypeError: volume[member].bind is not a function
TypeError: volume[member].bind is not a function
at patchFilesystem (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:277:43)
at C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:281:18
at Object.global.staticloader.undo (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:1
63:7)
at process.exit.n [as exit] (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:170:27)
at main (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\app.js:157:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:17240) UnhandledPromiseRejectionWarning: Error: EBADF: bad file descriptor, close
at Object.fs.closeSync (fs.js:529:3)
at StaticVolumeFile.shutdown (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:352:10)
at StaticFilesystem.shutdown (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:406:17)
at process.exit.n [as exit] (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:169:11)
at main (C:\Users\micde\AppData\Roaming\npm\node_modules\autorest\dist\app.js:239:17)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:17240) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing ins
ide of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio
n id: 1)
(node:17240) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejection
s that are not handled will terminate the Node.js process with a non-zero exit code.
I've noticed that too.
I think there have been a couple of breaking changes in the node 10 runtime -- This is happening on exit, so it's cosmetic, but I'll look into it when I get a chance.
I'm seeing this on node v12 as well
Any solution?
Node 10.15 works fine.
Worked! Thanks.
Issue resolved. Closing.
Most helpful comment
I'm seeing this on node v12 as well