# Why do I have copy files from node\_modules to my rails 6 app

**URL:** <https://discuss.rubyonrails.org/t/why-do-i-have-copy-files-from-node-modules-to-my-rails-6-app/77894>\
**Category:** Uncategorized\
**Created:** [May 7, 2021, 12:30am UTC](https://discuss.rubyonrails.org/t/why-do-i-have-copy-files-from-node-modules-to-my-rails-6-app/77894 "2021-05-07T00:30:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fugee\_ohu](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/fugee_ohu/32/14370_2.png) [@fugee\_ohu](https://discuss.rubyonrails.org/u/fugee_ohu)\
**Post date:** [May 7, 2021, 12:30am UTC](https://discuss.rubyonrails.org/t/why-do-i-have-copy-files-from-node-modules-to-my-rails-6-app/77894/1 "2021-05-07T00:30:56Z")

</div>

The docs for blueimp-gallery npm say install and copy css, img and js directories to my website Do really I have to copy those files to my rails 6 app Can’t the package use those directories by itself

---

<div class="post-metadata">

**Author:** ![kmitov](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/kmitov/32/1878_2.png) [@kmitov](https://discuss.rubyonrails.org/u/kmitov)\
**Post date:** [May 7, 2021, 6:10am UTC](https://discuss.rubyonrails.org/t/why-do-i-have-copy-files-from-node-modules-to-my-rails-6-app/77894/2 "2021-05-07T06:10:31Z")

</div>

You dont need to copy them. You can reference them as they are in the node\_modules directory. I don’t know the method by heard with webpacker 5 and recent webpacker 6, but check out for example [https://github.com/rails/webpacker/issues/349](https://github.com/rails/webpacker/issues/349)

---

<div class="post-metadata">

**Author:** ![fugee\_ohu](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/fugee_ohu/32/14370_2.png) [@fugee\_ohu](https://discuss.rubyonrails.org/u/fugee_ohu)\
**Post date:** [May 7, 2021, 1:41pm UTC](https://discuss.rubyonrails.org/t/why-do-i-have-copy-files-from-node-modules-to-my-rails-6-app/77894/3 "2021-05-07T13:41:05Z")

</div>

I need to import all the files in the modules css, js and img directories Do I have to import only one file at a time as shown in the example
