Question: I've got a Kanji database I'm putting together, and it's got several map tables to show one-to-many relationships between characters and how they can be read.

Keeping it simple, here are three sample tables:

```
`kanji`
    `id`
    `character`

`readings`
    `id`
    `reading`

`reading_map`
    `kanji` => Foreign Key to `kanji`.`id`
    `reading` => Foreign Key to `readings`.`id`

```

What I'm trying to figure out here is the proper way to set up the `ON UPDATE` and `ON DELETE` settings for these two keys.

* I want the `reading_map` table's entry to be removed if a relevant entry is removed from either `kanji` or `readings`
* I don't want deleting an entry from `kanji` or `readings` to reach further to remove its companion entry—only the `reading_map` entry should be removed on delete, from either side
* I don't want `ON UPDATE` preventing me from updating other data on the linked tables (e.g. I want to be able to fix spelling errors in `readings`.`reading` without having to remove the entry from `reading_map` first).

I was thinking about setting `CASCADE` for `ON DELETE`, however since I'm linking the key from the map table I wasn't sure if that meant deleting the map entry would cascade outward, or if removing one of the linked entries would cascade inward. I have no idea which is the right `ON UPDATE` setting.

Answer: 
You solved your problem.
Because installing application without **superuser permission** prevent the other dependencies to be installed.

I recommend to enter to super user / root by **sudo su -** when installing.
Run 'sudo npm install' to avoid exceptions and it creates node\_modules directory with current user. This solved my problem.