Frightening error messages about vmlinuz, initrd.img
See original GitHub issueAfter just installing react-admin on a freshly created Razzle app, I get frightening messages:
(node:3346932) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/vmlinuz'
(node:3346932) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:3346932) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/vmlinuz.old'
(node:3346932) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:3346932) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/initrd.img'
(node:3346932) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
(node:3346932) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/initrd.img.old'
(node:3346932) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
(node:3346932) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/vmlinuz'
(node:3346932) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
(node:3346932) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/vmlinuz.old'
(node:3346932) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
If a script is trying to reach my Linux bootloader, something seriously dangerous is occurring here…
In some cases, the error logs also showed this ENOENT error for $HOME/.steampath
The only other similar report I could find with Google is there: https://stackoverflow.com/questions/63165044/vue-cli-outputting-very-concerning-error-security-question
I did a full-text search (“vmlinuz”, “initrd”) with VScode, ripgrep and grep. Nothing found.
I deleted my $HOME/.nvm, $HOME/.npm $HOME/node_modules and $HOME/.yarn before redoing the steps below but the same happened.
Steps to reproduce:
npx create-razzle-app myapp
cd myapp
npm start
No error message here. Razzle is working fine.
# Ctrl+c (to kill the Razzle server)
npm i react-admin
npm start
Here, I get the normal Razzle stdout and then the error messages pasted above.
Environment react-admin 3.9.4 Ubuntu 20.04
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (5 by maintainers)
Top GitHub Comments
There seems to be a simple answer: these messages could just come from Node searching for
node_modules
in the project parent directories all the way to the filesystem root. (See https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders). It might also try to follow symlinks in case they point to anode_modules
directory, and emit an error each time it encounters a broken symlink in the process.That’s plausible and reassuring. No malicious script involved.
I removed initrd.img, /initrd.img.old, /vmlinuz and /vmlinuz.old, which were indeed broken symlinks. So I shouldn’t get these errors anymore.
Solved: I was also facing the same issue few days before. This is because if any of the code is importing any library ( package ) and if that library ( package ) is not installed it will throw this error. In my case, I have used exceljs in one of my component. And without installing exceljs I was trying to start the project. After intsalling the exceljs package its working fine.
Just try and find which package you have missed to install. ( may be you are trying npm install but the package you were using is not present in package.json (ie ) ).