You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error when running firebase cli (npm:firebase-tools) on Windows.
> deno --version
deno 1.28.3 (release, x86_64-pc-windows-msvc)
v8 10.9.194.5
typescript 4.8.3
> deno run -A npm:firebase-tools --version
error: Uncaught NotSupported: The operation is not supported
Deno.chmodSync(pathModule.toNamespacedPath(path), mode);
^
at Object.chmodSync (deno:runtime/js/30_fs.js:22:9)
at Object.chmodSync (https://deno.land/[email protected]/node/_fs/_fs_chmod.ts:32:8)
at Function.writeFileSync [as sync] (file:///C:/Users/ayame/AppData/Local/deno/npm/registry.npmjs.org/write-file-atomic/3.0.3/index.js:236:12)
at Configstore.set all (file:///C:/Users/ayame/AppData/Local/deno/npm/registry.npmjs.org/configstore/5.0.1/index.js:61:20)
at Configstore.set (file:///C:/Users/ayame/AppData/Local/deno/npm/registry.npmjs.org/configstore/5.0.1/index.js:91:12)
at Object.<anonymous> (file:///C:/Users/ayame/AppData/Local/deno/npm/registry.npmjs.org/firebase-tools/11.17.0/lib/track.js:20:31)
at Object.<anonymous> (file:///C:/Users/ayame/AppData/Local/deno/npm/registry.npmjs.org/firebase-tools/11.17.0/lib/track.js:153:4)
at Module._compile (deno:ext/node/02_require.js:734:36)
at Object.Module._extensions..js (deno:ext/node/02_require.js:767:12)
at Module.load (deno:ext/node/02_require.js:645:34)
I debugged this error and found it was caused by fs.chmodSync() incompatibility on windows. The code below gives an error only on deno.
// import fs from "node:fs";importfsfrom"https://deno.land/[email protected]/node/fs.ts";fs.chmodSync("tmp.txt",0o0600);
> deno run ./tmp.mjs
error: Uncaught NotSupported: The operation is not supported
at async Object.chmod (deno:runtime/js/30_fs.js:26:5)
According to denoland/deno#4357 (comment), when you perform an operation that is not available in windows (such as changing read permissions), node does not throw, but deno throws.
The text was updated successfully, but these errors were encountered:
According to denoland/deno#4357 (comment), when you perform an operation that is not available in windows (such as changing read permissions), node does not throw, but deno throws.
Introducing this behavior into Deno seems to have been a deliberate decision (denoland/deno#4446).
Perhaps the solution is to enclose the Deno.chmod{,Sync} in the _fs_chmod.ts with try-catch?
I get an error when running firebase cli (npm:firebase-tools) on Windows.
I debugged this error and found it was caused by
fs.chmodSync()
incompatibility on windows. The code below gives an error only on deno.> deno run ./tmp.mjs error: Uncaught NotSupported: The operation is not supported at async Object.chmod (deno:runtime/js/30_fs.js:26:5)
According to denoland/deno#4357 (comment), when you perform an operation that is not available in windows (such as changing read permissions), node does not throw, but deno throws.
The text was updated successfully, but these errors were encountered: