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
While the function deployment, I got the error shown in Image:
=== Deploying to 'securio-fleet'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
lint
eslint .
Oops! Something went wrong! :(
ESLint: 8.54.0
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Adevair Technologies\functions\node_modules@eslint\js\src\index.js from C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\config\flat-config-array.js not supported.
index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\Users\Adevair Technologies\functions\node_modules@eslint\js\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\config\flat-config-array.js:16:18)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\linter\linter.js:44:29)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\linter\index.js:3:20)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\cli-engine\cli-engine.js:37:20)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\eslint\eslint.js:16:50)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\eslint\index.js:3:20)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\cli.js:21:18)
at main (C:\Users\Adevair Technologies\functions\node_modules\eslint\bin\eslint.js:152:28)
at Object.<anonymous> (C:\Users\Adevair Technologies\functions\node_modules\eslint\bin\eslint.js:173:2)
While the function deployment, I got the error shown in Image:
=== Deploying to 'securio-fleet'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
Oops! Something went wrong! :(
ESLint: 8.54.0
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Adevair Technologies\functions\node_modules@eslint\js\src\index.js from C:\Users\Adevair Technologies\functions\node_modules\eslint\lib\config\flat-config-array.js not supported.
index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\Users\Adevair Technologies\functions\node_modules@eslint\js\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
Error: functions predeploy error: Command terminated with non-zero exit code 2
Having trouble? Try firebase [command] --help
Can anyone tells the reasons behind it.
The text was updated successfully, but these errors were encountered: