Hello, I have a problem, I am importing my project from Github, it loads normally but when I view the page I am surprised that the dependencies installed by node.js are not installed or my project is not entered in the folder node_modules.
As an alternative, I created a branch where I upload the node_modules folder to the repository but in the same way when deploying in netifly it does not pull these files from my dependencies, for example I installed bootstrap 5 through npm but within my project I am not getting this archive.
Link: https://master--radiant-lokum-558d27.netlify.app/
structure of my project:
Has anyone been through that problem?
I am not sure what exactly you’re mentioning as your issue. What’s the error you’re facing, or what’s the problem you’re trying to solve?
The problem is that I have installed bootstrap through npm and when I upload my project it does not pull any files into the node_modules folder, which is why the styles do not appear properly.
You need to build and bundle your files together. You’re not supposed to use files directly from node_modules
. This is more of a coding question than Netlify, but to answer that part, Netlify skips uploading node_modules
folder.
You need to use something like esbuild: esbuild - An extremely fast bundler for the web, to bundle your files.
1 Like