mirror of
				https://github.com/9technologygroup/patchmon.net.git
				synced 2025-11-04 05:53:27 +00:00 
			
		
		
		
	fix: Remove --ignore-scripts to allow trianglify/canvas to install
The 'i.from is not a function' error occurs because trianglify depends on canvas, and --ignore-scripts prevented canvas from installing properly. Solution: Remove --ignore-scripts and allow npm to run install scripts, but gracefully handle canvas rebuild failures since native bindings are optional for the production build.
This commit is contained in:
		@@ -23,7 +23,8 @@ COPY frontend/package*.json ./
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
RUN npm cache clean --force &&\
 | 
					RUN npm cache clean --force &&\
 | 
				
			||||||
    rm -rf node_modules ~/.npm /root/.npm &&\
 | 
					    rm -rf node_modules ~/.npm /root/.npm &&\
 | 
				
			||||||
    npm install --ignore-scripts --legacy-peer-deps --no-audit --prefer-online --fetch-retries=3 --fetch-retry-mintimeout=20000 --fetch-retry-maxtimeout=120000
 | 
					    npm install --legacy-peer-deps --no-audit --prefer-online --fetch-retries=3 --fetch-retry-mintimeout=20000 --fetch-retry-maxtimeout=120000 &&\
 | 
				
			||||||
 | 
					    (npm rebuild canvas || echo "Canvas rebuild failed, continuing without native bindings")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY frontend/ ./
 | 
					COPY frontend/ ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user