Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma Updates, Puppeteer Updates #2

Open
H0r53 opened this issue May 4, 2021 · 1 comment
Open

Prisma Updates, Puppeteer Updates #2

H0r53 opened this issue May 4, 2021 · 1 comment

Comments

@H0r53
Copy link

H0r53 commented May 4, 2021

Hello, and thank you for providing a great foundation for puppeteer / scraping. It looks like perhaps some of the code provided here is outdated. I'm working through the changes, but I wanted to provide them here for reference and discussion.

First, prisma appears to have updated with breaking changes. A few other packages seem to have updated as well. I updated the package.json to fix these issues.

-    "build:clear": "rm -rf ./build/app/ && mkdir ./build/app/ && echo * >> ./build/app/.gitignore",
+    "build:clear": "rm -rf ./build/app/ && mkdir -p ./build/app/ && echo * >> ./build/app/.gitignore",
-    "db:migrate": "npx prisma format && npx prisma migrate save --name foundation --experimental && npx prisma migrate up --experimental && npx prisma generate",
+    "db:migrate": "npx prisma format && npx prisma migrate dev --name foundation && npx prisma migrate && npx prisma generate",

Second, when running npm run init after making the changes above I eventually receive the following errors:

node_modules/puppeteer-extra/dist/puppeteer.d.ts:4:10 - error TS2305: Module '"puppeteer"' has no exported member 'ChromeArgOptions'.

4 export { ChromeArgOptions } from 'puppeteer';
           ~~~~~~~~~~~~~~~~

node_modules/puppeteer-extra/dist/puppeteer.d.ts:6:10 - error TS2305: Module '"puppeteer"' has no exported member 'FetcherOptions'.

6 export { FetcherOptions } from 'puppeteer';
           ~~~~~~~~~~~~~~

core/browsers/config.ts:128:3 - error TS2322: Type '{ headless: boolean; ignoreHTTPSErrors: boolean; args: string[]; userDataDir: string; defaultViewport: { width: number; height: number; }; }' is not assignable to type 'LaunchOptions'.
  Object literal may only specify known properties, and 'headless' does not exist in type 'LaunchOptions'.

128   headless: env.BROWSER_HEADLESS === "true",

These look like typescript errors related to puppeteer exports. I'm not sure if this repo is maintained but I wanted to mention this here just in case.

Thanks again!

@prescience-data
Copy link
Owner

This was really just a prototype for https://masqueradejs.com (which is still in progress) but I'll try sharpen it up when I get a chance :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants