Error: ENOENT: no such file or directory, open '/root/.ionic/daemon.log'

Viewed 1010

I had this error on windows 10, i did a fresh Ubuntu install over windows erasing everything, still...after i download newest nodejs version and newest ionic and cordova version i get this error when i try to use ionic..how?!?!?!?!

ionic info [WARN] You are not in an Ionic project directory. Project context may be missing.

cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

System:

Node : v8.6.0
npm  : 5.3.0 
OS   : Linux 4.10
2 Answers

I've faced the same issue as you, but I've done that steps and it worked.

  1. Type npm cache clean and hit Enter.
  2. Type sudo npm install -g npm and hit Enter.
  3. Then type npm install and hit Enter. (you can ignore this step and run your project)

If you still have the same issue try npm update then run your ionic project.

here's the link of the steps

I had this issue when I was building the app inside a Docker container, it can also occur on any Ubuntu (or Linux) machine.

The error expects a daemon.log file that apparently does not exist. If you manually create the daemon.log file it should work without side-effects.

Just run the following commands:

mkdir -p /root/.ionic
touch /root/.ionic/daemon.log

After running these commands, all Ionic CLI commands should work correctly.

Related