react-admin: Frightening error messages about vmlinuz, initrd.img

After 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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted 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 a node_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 ) ).

I had this initrd.img error recently, it ended up being me writing the import incorrectly. In my project, I did import $ from 'jQuery'; instead of import $ from 'jquery'; Not sure if this is the same issue as yours but hope this helps.

Something quite similar for me: I was having this problem and fixed it simply by changing import styles from "Editor.module.css" to import styles from "./Editor.module.css" Hope it helps somebody

I’ve just had the error messages after creating a new Razzle project and then just installing material-ui.

I met a similar error message, after removing all deps and reinstalling them again, it says there’s ‘node-sass’ dependency issue. Then I rebuild the dep, the error was gone.

Same error source for me as for @yuichiu416. I did import {Helmet} from 'react-helmet'; instead of import { Helmet } from 'react-helmet'; and then received this error about a missing initrd.img.