Meteor unable to open database and uninstall problem


#1

Hi a random error occurred today when I tried to run my Meteor apps. I tried all the meteor commands such as meteor update, meteor, meteor create newApp, etc. Every time the errors says : SQLITE_CANTOPEN: unable to open database file. I tried the solution by changing ownership of the file but it still doesn’t work: sudo chown -R whales ~/.meteor.

So I decided to just uninstall meteor and reinstall it. However when I uninstalled it by running the two commands:

rm -rf ~/.meteor/
sudo rm /usr/local/bin/meteor

Both commands ran into the problem of can’t remove read only file system.

Totally stuck…thanks for the help…


#2

What operating system are you on? Is /usr/local its own filesystem?


#3

It’s linux Ubuntu. Sorry should have mentioned that. I am not sure I understand the second question. But I tried to navigate into /usr/loca/bin and this is what it looks like:


#4

First of all, do not install meteor as root. What is the output of

ls -ld $HOME/.meteor

#5

drwxr-xr-x 4 whales whales 4096 Aug 18 16:34 /home/whales/.meteor

whales is my username.


#6

do you own the files in this directory?

ls -ls $HOME/.meteor/package-metadata/v2.0.1

#7

This is the output:

total 241000
236716 -rw-rw-r-- 1 whales whales 242393088 Aug 18 13:25 packages.data.db
32 -rw-rw-r-- 1 whales whales 32768 Aug 19 20:41 packages.data.db-shm
4252 -rw-rw-r-- 1 whales whales 4353424 Aug 19 20:41 packages.data.db-wal

Also for installation, is it in the root directory? When I first installed it, i simply just used the curl https://install.meteor.com/ | sh from the guide. So I don’t know why it would be in root.

I tried changing file permissions with “sudo chmod g+w .meteor” but it won’t work. So I tried "sudo mount -o remount,rw ‘.meteor’ " and it says

mount: /home/whales/.meteor not mounted or bad options.

Everything was working fine before today. I just woke up this morning and tried to work on my app and somehow it won’t work anymore.


#8

I restarted the laptop and the error is gone…Another issue that I will never found out why :slight_smile:


#9

It might be file inconsistency issues. I restarted the laptop and did fsck