You are not logged in.

#1 2021-09-03 07:41:40

kup
Member
Registered: 2021-07-14
Posts: 3

Error: ENOENT: no such file or directory, stat "timezone file".

I was developing a react app and suddenly it stopped, it's never have happened before so i am curious what made it happened?

I don't know if there was a file named "/Kolkata" before but it is present now with lrwxrwxrwx   1 root root

Below is the error i got, react app stopped and throwed up this error:

node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

[Error: ENOENT: no such file or directory, stat '/Kolkata'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '/Kolkata'
}

Also "ls /usr/share/zoneinfo/Region/" is giving me error:

ls: cannot access '/usr/share/zoneinfo/Region/': No such file or directory

Is it normal?

Offline

#2 2021-09-03 09:37:06

StJimmy
Member
From: Rheinland
Registered: 2020-02-26
Posts: 72

Re: Error: ENOENT: no such file or directory, stat "timezone file".

Yes, as Region is to be substituted with your actual region - which for this case would be Asia.


Nanos gigantum humeris insidentes.

Offline

#3 2021-09-03 10:43:37

kup
Member
Registered: 2021-07-14
Posts: 3

Re: Error: ENOENT: no such file or directory, stat "timezone file".

Yes i checked and everything was fine with the timezone, but don't know how automatically "/Kolkata" symlink was created with link to "/usr/share/zoneinfo/Region/Kolkata"

Is it possible that my react app created it, but i didn't code anything related.

Offline

#4 2021-09-03 14:23:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,342

Re: Error: ENOENT: no such file or directory, stat "timezone file".

% pacman -Qo /usr/share/zoneinfo/Asia/Kolkata
/usr/share/zoneinfo/Asia/Kolkata is owned by tzdata

The file is perfectly supposed to be there. Your post lacks some context.
The script seems to try to access /Kolkata (ie. a file on the root partition) which obviously should not be there.
Then you try to stat the bogus (it's not supposed to be there) path "/usr/share/zoneinfo/Region/" w/o any explanation as to why and it's not in the context of the error either.

The original error suggest a bug in your script that tries to address /Kolkata what smells like it's running on $PWD / and you're trying a relative path ("Kolkata") when you should have accessed the file w/ an absolute path ("/usr/share/zoneinfo/Asia/Kolkata")
You say somehow™ magically a symlink on the root partition ("/Kolkata") appeared, but that symlink requires UID0 (root) privilegues to be created. So this didn't just happen (unless your script runs as UID0 in which case: please stop doing that)

Bottom line: remove any symlink "/Kolkata" (as it has no business being there) and fix your script to control the actually references paths.

Offline

Board footer

Powered by FluxBB