Can't install #firebase/testing in firebase CLI - node.js

I was using firebase CLI for testing my cloud firestore security rules and I received the following error while installing #firebase/testing using npm install #firebase/testing --save-dev-
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
> core-js#3.6.5 postinstall E:\Coding\Web\poll-app firebase test\test\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
internal/modules/cjs/loader.js:967
throw err;
^
Error: Cannot find module 'E:\Coding\Web\poll-app firebase test\test\node_modules\core-js\-e'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:964:15)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1346:46)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN test#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js#3.6.5 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the core-js#3.6.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Can someone tell me what I should be doing?

So, I could fix it by doing the following. I went to my firebase console and opened a cloud shell from security rules playground option. Once it had loaded, I followed the steps given by the learning assistant shown on the right panel and set up my cloud shell by cloning the tutorials from GitHub. Then, I went to quickstart-testing/cs-walkthrough/functions and downloaded the node_modules folder. It was download as a tar file. I ran WinRAR with admin privileges and extracted the tar file. And it worked. I really don't understand how and why it worked but this is what I did to solve the problem.

Related

Ionic is not working well on server CentOS 7.99 after correct installation

I am getting frustrated because I can't make the approach I am searching for. I want to run an ionic server I've installed node, npm , angular, ionic, Cordova.
what's the error?
ionic start todo blank
System ask me if I want angular, I select angular, so, the system starts to run commands and it get stuck on
npm i --save -E #capacitor/core#latest
it gives me an error with post install script, this one specific:
> npm i
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, whichis known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, whichis known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /root/ion_test/todo/node_modules/#angular/cli
npm ERR! command failed
npm ERR! command sh -c node ./bin/postinstall/script.js
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module '/root/ion_test/todo/node_modules/#angular/cli/bin/postinstall/script.js'
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR! at node:internal/main/run_main_module:17:47 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-28T17_51_13_147Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Please I need help, the server will be launching this in 7 days, I was wondering how can I solve this error and run ionic start and ionic serve with no errors.
Sounds like your Angular install is either borked or outdated, or there's a mismatch between the Angular version and Ionic. Try npm install -g #angular/cli#latest and see if that helps. If not, post your Angular version and your package.json.

Gatsby default starter

This error came when I created gatsby-default-starter site. How to solve it. What is the problem with it?
Error message:
‼ pngquant pre-build test failed i compiling from source × Error: pngquant failed to build, make sure that libpng-dev is installed at D:\gatsby-project\my-gatsby-project\node_modules\bin-build\node_modules\execa\index.js:231:11 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Promise.all (index 0) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pngquant-bin#6.0.0 postinstall: node lib/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pngquant-bin#6.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
ERROR
Command failed with exit code 1: npm install
Error: Command failed with exit code 1: npm install
error.js:56 makeError [npm]/[gatsby-cli]/[execa]/lib/error.js:56:11
index.js:114 handlePromise [npm]/[gatsby-cli]/[execa]/index.js:114:26
task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5
init-starter.js:135 install [npm]/[gatsby-cli]/lib/init-starter.js:135:7
init-starter.js:202 clone [npm]/[gatsby-cli]/lib/init-starter.js:202:3
init-starter.js:343 initStarter [npm]/[gatsby-cli]/lib/init-starter.js:343:5
create-cli.js:494 [npm]/[gatsby-cli]/lib/create-cli.js:494:9
It seems that you are using Windows as OS. This issue is usually related to some additional dependencies that you may need. Try the following:
Delete your project (to avoid potentially corrupted dependencies).
Install the windows-build-tools by:
npm install --global windows-build-tools --vs2015
Run your starter command and develop it. For example:
npm install -g gatsby-cli
gatsby new gatsby-site
cd gatsby-site
gatsby develop
If the issue persists try installing manually the missing dependencies by:
npm install imagemin-pngquant#5.0.1 --save
npm install pngquant-bin#3.1.1 --save
For further details check Gatsby on Windows docs.

Installing puppeteer results in "file already exists" error

When I first tried to install puppeteer through npm, I got errors saying permission is denied for the .local-chromium folder. So I followed this SO post and that error went away, but now there is another (base path is omitted):
$ sudo npm install puppeteer --unsafe-perm=true
> puppeteer#5.2.1 install ##########/node_modules/puppeteer
> node install.js
(node:25349) ExperimentalWarning: The fs.promises API is experimental
Downloading Chromium r782078 - 126.4 Mb [====================] 100% 0.0s
ERROR: Failed to set up Chromium r782078! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
{ [Error: EEXIST: file already exists, mkdir '##########/node_modules/puppeteer/.local-chromium/linux-782078']
errno: -17,
code: 'EEXIST',
syscall: 'mkdir',
path:
'##########/node_modules/puppeteer/.local-chromium/linux-782078' }
npm WARN notsup Unsupported engine for puppeteer#5.2.1: wanted: {"node":">=10.18.1"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: puppeteer#5.2.1
npm WARN notsup Unsupported engine for extract-zip#2.0.1: wanted: {"node":">= 10.17.0"} (current: {"node":"10.4.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: extract-zip#2.0.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer#5.2.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer#5.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ######/.npm/_logs/2020-07-30T16_32_37_096Z-debug.log
But that directory doesn't exist, nor does puppeteer at all within node_modules so I can't delete it and retry. I'm not sure what the installation is reffering to. Does anybody have any idea what it could mean?
Also, this is irrelevant but another concern is with the warnings saying that a node version >=10.18.1 is wanted and so 10.4.0 is unsupported, any ideas what's up with that as well?
I ended up using nvm to switch to the stable Node release (10.18.1) which resolved both the errors and the warnings. I guess there was some incompatibility with newer Node versions.

Deployment fails while installing node-sass on Azure linux web app

I'm trying to deploy a website to Azure App Service running Linux, but the deployment fails. The issue seems to be with installing node-sass.
I've set Node to the most recent version that the service supports.
> node-sass#4.11.0 install /home/site/wwwroot/node_modules/node-sass
> node scripts/install.js
fs.js:126
throw err;
^
Error: EINVAL: invalid argument, open '/home/site/wwwroot/node_modules/node-sass/package.json'
at Object.fs.openSync (fs.js:559:3)
at Object.fs.readFileSync (fs.js:465:33)
at Object.Module._extensions..json (internal/modules/cjs/loader.js:695:20)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/home/site/wwwroot/node_modules/node-sass/lib/extensions.js:7:9)
at Module._compile (internal/modules/cjs/loader.js:678:30)
npm WARN ppi-web#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.11.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.11.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
...
npm ERR! A complete log of this run can be found in:
npm ERR! /home/.npm/_logs/2019-02-07T18_09_48_891Z-debug.log
Running "/opt/nodejs/10.1.0/bin/node" "/opt/npm/6.0.1/node_modules/npm/bin/npm-cli.js" run-script build
I followed this guide. After scaffolding express application, I pushed the code to a github repo and used the Azure Extensions in VS Code to configure the deployment source to my recently create github repo and succeeded.
I'm not exactly sure how you deployed but hopefully this will help. Unfortunately I don't have enough reputation points to ask how you went about deploying but please feel free to let me know.

Throwing error while executing npm install marialsql

I would need your help in resolving below error.
I am trying to build an angular project with mariasql as it is the backend db
In order to do that: I tried following steps
Step-1: I installed windows production tool with following command
line as maria db requires Microsoft Visual studio compiler
`"npm install --global windows-build-tools"`
After step-1, I have got visual studio and python 2.7 in my laptop when i installed the global windows build tools
Step-2: I set PYTHON Environment variable in my system
Step 3: I created a brand new angular project like below
ng new selenium-package
The project got created with node_modules
Step 4: I tried installing marialsql as below
npm install mariasql
With this, I am getting below error:
C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-package\node_modules\mariasql> if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "node C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-automation-builder\node_modules\node-gyp\bin\node-gyp.js" rebuild ) module.js:557
throw err;
^
Error: Cannot find module 'C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-package\node_modules\mariasql\node C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-automation-builder\node_modules\node-gyp\bin\node-gyp.js'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:618:3 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mariasql#0.2.6 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mariasql#0.2.6 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Jack\AppData\Roaming\npm-cache\_logs\2017-12-22T04_49_00_804Z-debug.log

Resources