angular2-image-gallery | Image Gallery built with Angular 15+ , node.js | Widget library
kandi X-RAY | angular2-image-gallery Summary
kandi X-RAY | angular2-image-gallery Summary
Image Gallery built with Angular 8+, node.js and GraphicsMagick
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angular2-image-gallery
angular2-image-gallery Key Features
angular2-image-gallery Examples and Code Snippets
Community Discussions
Trending Discussions on angular2-image-gallery
QUESTION
I am using angular2-image-gallery https://github.com/BenjaminBrandmeier/angular2-image-gallery
It is causing me an error on production (also locally) about importing twice BrosweModule from angular. In my local build, I have changed the main component BrowseModule import to CommonModule as suggested on the error message and it works perfectly.
However, I could not get it to work in production when uploading it to netlify.
What I have tried: Forcing git add node_modules/angular2-image-gallery folder and deleting it from package.json so netlify does not install it and uses the one I have modified.
Deployement is successful after git push but same error hapens. How? I realised it was using old dependencies so the error remained the same.
So, I created another website and started to deploy using the same repository and the build fails. Actually, it compiles everything, and once compiled it says the following error:
ERROR in /opt/build/repo/src/app/gallery/gallery.module.ts (8,42): Cannot find module 'angular2-image-gallery'.
There a lot of errors related to this module not beign found. But it's there in the node_modules folder. What should I do?
Thanks in advanced.
...ANSWER
Answered 2017-Mar-27 at 18:25Note: I work for Netlify.
This article describes our build process.
The behavior you're seeing shows that we run npm install
automatically if we find a package.json
, but what you might be missing is that we run it before your build starts, and we will only re-run that (instead of using a cached copy of the output of the last run) if the checksum on the file changes.
Some folks who've needed to do some finicky installation tricks have used something like npm install package-name -g ; npm build
as a build command, but I don't think that will help you install a modified package unless you've republished it on npm.
I don't think this is the right solution - I think fixing the double import is a superior solution but I don't have any advice on that - but here's our best methodology for adding a package from your repo into the right location so it works. Note that you will be responsible for making sure all of that package's dependencies are listed explicitly in your package.json so that they get installed for you. Like I said, this is not the right way to do this (the right way would have you fixing the import and us installing the dependencies as intended from package.json automatically without you maintaining a list), but it is a way.
To do this, you might try copying your module into our node directory rather than using your own. We store node dependencies in /opt/cache/build/node_modules rather than in the typical ./node_modules.
You'll first want to check this modified copy into your repo (sounds like it is there already) and then copy it out into that directory, making sure to put any auxiliary links/pieces in .../bin and similar directories within that node_modules tree as well as the package itself in its node_modules/X directory. I might do this in a build command of:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular2-image-gallery
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page