Gcloud no space error after editing prompt - google-cloud-shell

I was editing my bash prompt and I had to make a backup so i ran:
cp ~/.bashrc ~/.bashrc.bak
The next day I tried to download an npm package and it spat out:
npm ERR! code ENOSPC
npm ERR! syscall write
npm ERR! errno -28
npm ERR! nospc ENOSPC: no space left on device, write
npm ERR! nospc There appears to be insufficient space on your system to finish.
npm ERR! nospc Clear up some disk space and try again.
However I have not installed anything, So i restored and deleted my backup of .bashrc.bak
and ran it again and it spat out the same thing only it did it 12 times.
Please help

The Cloud shell is not designed to create a large development because this ephemeral VM has only 5GB of persistent disk.
AS a workaround you can reset Cloud shell to purge all unnecessary data and start from the scratch with an empty disk
Or you can use a Compute Engine Always free F1-micro instance, these instances include 30 GB-months HDD

Related

Something went wrong installing JavaScript dependencies, check your npm logfile or run npm install again manually [duplicate]

I am using react native and Expo. I am unable to build new app because after I use expo init appName it shows the following error.
Heres the full message:
📦 Using npm to install packages. You can pass --yarn to use Yarn instead.
√ Downloaded and extracted project files.
× Something when wrong installing JavaScript dependencies. Check your npm logs. Continuing to initialize the app.
✅ Your project is ready!
To run your project, navigate to the directory and run one of the following npm commands.
- cd Scanner
- npm start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- npm run android
- npm run ios # requires an iOS device or macOS for access to an iOS simulator
- npm run web
I tried multiple times to create a blank project, also tried npm install to install failed/not downloaded libraries and continue after failure but it showed another error:
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file
also tried npm cache verify that showed cache is ok Content verified: 3562 (252580364 bytes).
So, How can I solve this issue?
Problems related to npm installation are very common If you do any mistake in early installation, but is avoided. Learn more about npm tree.
Steps worked for me are :
npm cache clean --force
npm cache verify
npm -g uninstall expo-cli --save
npm install expo-cli --global
expo init app-name
cd app-name
npm start
Always run as administrator if working on Windows and in root directory.
The solutions above didn't work for me but if you use 'npm install' in the directory of the app you get a clue that you shuold try 'npm install --force'
err message
You should have all these files folders and files at the start of the project otherwise not all the dependencies have been installed which is why we were getting the problem.folder structure
After you have added --force to npm install you have all the dependencies installed. Now you can run the app with npm start.
Unfortunately, all the solutions described above didn't work on my machine...
Here is my latest solution for this problem...
This worked 100% on my machine...
Use npm i -g expo-cli
This will automatically add the required packages and also remove the unnecessary ones.
Yes, surely, you don't need to uninstall and re-install it again.
Just follow my steps.
And, you can create your expo project using expo init.
I hope my solution will help you out from this annoying problem....
I just did npm install and it worked for me, but I had do that every time I create a new expo project.
I also encountered this problem, and finally found that it was the problem of react native cli,I installed the latest version of react native cli,Expo is back to normal
This Error is regarding to the git account. expos need a git account to setup react native project
If you are using windows you need to install git in your local PC
after that open your Terminal and type this command
git config --global user.name "your_username"
git config --global user.email "your_email_address#example.com"
after that clone any github project to your local computer. it will ask to login to Github
after all these steps try expo init <projectname>
The simple way to settle that error is by using "expo-cli init app-name" instead of "expo init app-name".
I tried and worked perfectly for me. Hope it will help you guys.
i have faced a similar problem and running yarn set version 1.22.1 fix it
Run the Command Prompt as an administrator. And run the following command:
npx create-expo-app AwesomeProject

i wanted to run sqlite code in vs code but it shows sqlite is not recognised as an internal or external command

C:\Users\acer\djnago>npm install sqlite
added 1 package, and audited 124 packages in 13s
3 packages are looking for funding
run npm fund for details
3 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
C:\Users\acer\djnago>sqlite flights.sql
'sqlite' is not recognized as an internal or external command,
operable program or batch file.
npm only installs the required libraries for Node.js. You need to install the SQLite tools for Windows from the official website.

Problem with CSS module not found when deploying to vercel

This is the error log. And I cannot for the life of me fix this. everything works fine in dev but on deployment it fails. :(
23:12:53.687 Failed to compile.
23:12:53.687 ModuleNotFoundError: Module not found: Error: Can't resolve '../../styles/Homebody.module.css' in '/vercel/workpath0/components/Home'
23:12:53.687 > Build error occurred
23:12:53.688 Error: > Build failed because of webpack errors
23:12:53.688 at /vercel/workpath0/node_modules/next/dist/build/index.js:15:918
23:12:53.689 at runMicrotasks (<anonymous>)
23:12:53.689 at processTicksAndRejections (internal/process/task_queues.js:93:5)
23:12:53.689 at async /vercel/workpath0/node_modules/next/dist/build/tracer.js:3:470
23:12:53.704 npm ERR! code ELIFECYCLE
23:12:53.704 npm ERR! errno 1
23:12:53.707 npm ERR! next_front#0.1.0 build: `next build && next export`
23:12:53.707 npm ERR! Exit status 1
23:12:53.707 npm ERR!
23:12:53.707 npm ERR! Failed at the next_front#0.1.0 build script.
23:12:53.707 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
23:12:53.714 npm ERR! A complete log of this run can be found in:
23:12:53.714 npm ERR! /vercel/.npm/_logs/2021-02-24T23_12_53_708Z-debug.log
23:12:53.719 Error: Command "npm run build" exited with 1
One thing is to start all .module.css files with a capital letter. Sometimes. however, you will still get the same error. To make matters worse, the error keeps occurring for varying .module.css files. So sometimes you will get A.module.css not found, and another time you get B.module.css not found.
I then deleted node_modules and ran npm i. No result; same error.
What did work for me was to make a new project with:
yarn create next-app
…and then add all the files from the old module one by one while redeploying the app each time to check it still works.
This isn't elegant, but it's fast enough and it does the trick.
This is an old question but I hope I can help someone in the future!
I was able to solve this issue by moving my CSS module file out of a subfolder into the root Styles folder.
Before:
-Styles
--Pages
---FileName.module.css
After:
-Styles
--FileName.module.css

Firebase Cloud Functions Invalid tag name "glob" error in my Command Line

I following this link to organize my firebase cloud functions and not have all my code in one index.ts file. However, when I'm running the line:
npm i -S glob, camelcase
in my console, it's retuning this:
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "glob,": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/johndoe/.npm/_logs/2018-12-24T19_46_03_264Z-debug.log
Use npm i glob camelcase instead. The comma is not correct here. The -S is not even a documented flag for npm (at least not on the man page for my installation).

Unable to run hubot locally

I keep getting this error. How should I solve it?
npm WARN hubot-slack#4.5.4 requires a peer of hubot#^2.0.0 but none is
installed. You must install peer dependencies yourself.
audited 339 packages in 2.26s found 2 vulnerabilities (1 low, 1 high)
run npm audit fix to fix them, or npm audit for details ./hubot:
8: exec: node_modules/.bin/hubot: not found
This can be a dependency issue. Do check the dependencies.
Also run the commands npm audit and npm audit fix to get deep into the issue.
You should run hubot not from the bin directory but from the parent directory as:
bin/hubot
Reference: https://github.com/hubotio/hubot/issues/1061#issuecomment-179422364

Resources