Puppeteer Deployment Error - Nodejs

Hi please can anyone solve this because i was getting this error , I am trying to deploy puppeteer,
i tried adding
Set an env var of PUPPETEER_CACHE_DIR to /opt/render/project/puppeteer

Then create a build script in your repo, e.g. render-build.sh. With something like:

#!/usr/bin/env bash
# exit on errorset -o errexit

npm install
# npm run build # uncomment if required

# Store/pull Puppeteer cache with build cache
if [[ ! -d $PUPPETEER_CACHE_DIR ]]; then 
  echo "...Copying Puppeteer Cache from Build Cache" 
  cp -R $XDG_CACHE_HOME/puppeteer/$PUPPETEER_CACHE_DIR
else 
  echo "...Storing Puppeteer Cache in Build Cache" 
  cp -R $PUPPETEER_CACHE_DIR $XDG_CACHE_HOME
fi

Update your Build Command to call the build script, e.g. ./render-build.sh

but getting this error

Hi,

The issue appears to be a missing space:

cp -R $XDG_CACHE_HOME/puppeteer/$PUPPETEER_CACHE_DIR

should probably be

cp -R $XDG_CACHE_HOME/puppeteer/ $PUPPETEER_CACHE_DIR

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.