[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live) [Help](/c/help/9) # BUG: Missing file from node_module 162 views · 3 likes · 10 posts Crwntec (@crwntec) · 2025-05-10 **Somehow files are missing from node_modules in the Deployment** When hosting my application on vercel, visiting anything under /journey/ produces the following error: ``` Uncaught Exception: [Error: ENOENT: no such file or directory, open '/vercel/path0/node_modules/db-hafas-stations/full.ndjson'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/vercel/path0/node_modules/db-hafas-stations/full.ndjson' } ``` **This only happens on vercel.** It referrrs to a submodule of db-vendo-client which is a library my code uses. Here is the relevant lines (src/components/journey/StopsContainer.tsx): ``` useEffect(() => { if (!risId) return; async function fetchJourney() { setVendoLoading(true); const vendoData = JSON.parse(await getVendoJourney(risId)); if (!vendoData) { setVendoLoading(false); return; } setStopsWithVendo((prev) => prev.map((stop) => { const vendoStop = vendoData.stopovers?.find( (vendoStop: any) => vendoStop.stop?.id === stop.station.evaNo ); if (!vendoStop) return stop; return { ...stop, loadFactor: vendoStop.loadFactor, }; }) ); setVendoLoading(false); } fetchJourney(); }, [risId]); ``` ``` "build": "next build && ls node_modules/db-hafas-stations/", ``` I have added a ls statement to the build command to output the contents of said module. This however outputs the following: > [11:18:59.304] data.ndjson > [11:18:59.305] full.ndjson > [11:18:59.305] index.js > [11:18:59.305] license-data.md > [11:18:59.305] license.md > [11:18:59.305] package.json > [11:18:59.306] readme.md I have no clue what is happening. All modules are installed correctly. No errors during build process or on any other pages. Thank you in advance [GitHub source](https://github.com/crwntec/db-live-monitor/) [Page producing the error](https://db-live-monitor.vercel.app/journey/20250504-22028e5d-11d9-3b6f-8c5b-938de3e351b7) Pauline P. Narvas (@pawlean) · 2025-05-13 Hey, @crwntec! I'm unable to see the error on the page. It actually looks like it's running smoothly! Could you share you changed? Crwntec (@crwntec) · 2025-05-13 Sorry. The error is only visible in the logs. Client wise you can see that the loading doesn’t finish for the occupancy. The loading spinners next to the stop names should finish loading and display an icon. However if you look in the browser console you can see that request failing because of the error above  Crwntec (@crwntec) · 2025-05-13 This is the link to the screenshot btw https://db-live-monitor.vercel.app/journey/20250513-972190a9-a45a-34ff-aad0-ceb16a070980 zellnerlu (@zellnerlu) · 2025-05-27 · ♥ 1 Hey @crwntec, I recently ran into the exact same issue when deploying my app that uses `db-vendo-client`, which in turn depends on `db-hafas-stations`. Since GitHub imposes a 100 MB file size limit and Vercel’s free plan has a 50 MB limit for serverless function bundles, my suspicion was that Vercel silently skipped the large `full.ndjson` (~119 MB) file during install — and then failed when trying to access it at runtime. To work around this, I extracted the data from `full.ndjson` and imported it into my own PostgreSQL table. I then modified the `db-vendo-client` code to query my database instead of reading from the file via `db-hafas-stations`. That resolved the issue for me. 😊 Hope that helps! Crwntec (@crwntec) · 2025-05-27 · ♥ 1 Well this could be a potential explanation. But wouldn’t this trigger a build error? I’ve seen these „function exceeds size limit“ before online but not in my application. And my post install scripts outputs a listing of the modules directory that somehow contains the file? I mean your fix sounds like a good workaround but where is this coming from? Radioactive.exe (@radioactive-exe) · 2025-08-04 · ♥ 1 I'm having the same issue, but with a library without external dependencies. More specifically, I am using Zod to create and validate configuration schemas, and I'm using a simple import map to pinpoint it in my `node_modules` folder (due to my TS configuration). No matter what I do, trying to utilise or access anything inside `node_modules/zod` returns with the same exact behaviour mentioned on your end. Locally, everything works fine, but not at all on Vercel. Zod also has a bundled size of 5-7kb, so I'm not sure if the size would also be an issue, unless I've misunderstood. Building and `ls`ing shows a perfect installation, to no avail. I have a mono-repo but duo-deployment setup for both my frontend and backend, and this issue is only present with Zod in the frontend. thecalvinchan (@thecalvinchan) · 2025-11-27 <!-- Questions that get answered the fastest are the ones with relevant info included in the original post. Be sure to include all detail needed to let others see and understand the problem! --> <!-- Current versus Expected behavior --> <!-- Code, configuration, and steps that reproduce this issue --> <!-- Project information (URL, framework, environment, project settings) --> Hi everybody, I am running into the same error that is being described in this previous post: https://community.vercel.com/t/bug-missing-file-from-node-module/10324 I have tried building `npm run build` and running locally `npm run start` using the default nextjs scripts. Everything works fine locally, but when I try to hit an endpoint on production (deployed via vercel), I get the following error: `[Error: ENOENT: no such file or directory, open 'node_modules/kuromoji/dict/base.dat.gz'] {` ` errno: -2,` ` code: 'ENOENT',`  I noticed that the original discussion thread was closed due to inactivity, but hoping to get some help regarding this issue. Pauline P. Narvas (@pawlean) · 2025-11-28 Hi, @thecalvinchan! I just moved this to the original thread to keep discussions in one place. Do you have a minimal reproducible example we can take a look at? I recommend checking out this thread: community.vercel.com/t/how-to-get-good-answers/158 thecalvinchan (@thecalvinchan) · 2025-12-02 Thanks @pawlean . Sure, I am trying to use the [Kuroshiro](https://github.com/hexenq/kuroshiro) libraries to provide ruby text to japanese characters. Here’s my lib file ``` // @ts-expect-error Kuroshiro is not typed import KuromojiAnalyzer from "kuroshiro-analyzer-kuromoji" // @ts-expect-error Kuroshiro is not typed import Kuroshiro from "kuroshiro-enhance" // Instantiate const kuroshiro = async () => { let _kuroshiro: Kuroshiro | null = null if (!_kuroshiro) { _kuroshiro = new Kuroshiro() await _kuroshiro.init(new KuromojiAnalyzer()) } return _kuroshiro } export default kuroshiro ``` And it’s being used in my route file like so ``` if (includePronunciation && output_target_language) { const kuroshiroInstance = await kuroshiro() const furigana = await kuroshiroInstance.convert(output_target_language, { to: targetSyllabary, mode: "furigana" }) output_furigana = furigana } ``` In this example, kuromoji is a dependency of kuroshiro-analyzer-kuromoji. This is working completely fine on my local computer (i have tested npm run build and npm start), but for some reason, vercel is unable to find the dictionaries provided by kuromoji.