Setup with npm #53
-
Hi All, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi, Please, be specific - what "import statements" do you use, what error do you receive and what is Express? |
Beta Was this translation helpful? Give feedback.
-
yes sir, okay i used npm to install fancyapps and I can see the files in my project 'node_modules' folders. When I use 'import { Fancybox } from "@fancyapps/ui"; in my index.js file fancyapps doesn't work, I think because the node_modules folder is outside my root 'app-files' folder ... I think I just have to create the correct path but then I still need the fancyapps files in 'node_modules' on the server for deployment.. not sure what the right question is I guess.... Do I need node.js running on my server (and this to be a node project) to use the 'node_modules' architecture? sorry noob lost in the woods next to a path |
Beta Was this translation helpful? Give feedback.
-
Obviously, to use NPM, which stands for Anyway, you can always use CDN links or simply download JS and CSS files and copy inside your webroot. |
Beta Was this translation helpful? Give feedback.
Obviously, to use NPM, which stands for
Node package manager
, you need Node. But, it does not matter how you get JS and CSS files, just make sure they are available on your site. If your files are outside root directory, then you need Webpack or something like that, to bundle your assets so that they are available.Anyway, you can always use CDN links or simply download JS and CSS files and copy inside your webroot.