Reputation: 7549
I've recently migrated my project to Angular 13. It builds locally on my Mac, however it's started to fail when I run it in my Docker build container (tested both locally and on our CI/CD server.
It's complaining about the DeckGL import:
Cannot find module '@deck.gl/layers' or its corresponding type declarations.
1 import * as Layers from '@deck.gl/layers';
Cannot find module '@deck.gl/geo-layers' or its corresponding type declarations.
2 import * as GeoLayers from '@deck.gl/geo-layers';
Cannot find module '@deck.gl/aggregation-layers' or its corresponding type declarations.
3 import * as AggregationLayers from '@deck.gl/aggregation-layers';
I've used npm list
to ensure the dependencies are the same on my Mac and within the Alpine container and have also tested using the same Node version (and have tried a couple of different Node / Apline images), however, the issue persists, whilst still working locally.
Any ideas what could be causing this?
Upvotes: 0
Views: 383
Reputation: 7549
Really silly issue, but posting an answer in case someone runs into a similar issue in future.
I had accidentally run npm install
in a top-level directory, and had installed some Node modules that didn't end up in my package.json
file. In my case, I had the core deck.gl
module installed in my package.json
, but none of the layer packages (which are separate npm modules).
When I was running it locally, it was finding the correct dependency, but when running it on the CI/CD environment, it was obviously failing.
Upvotes: 1