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

Module parse failed: Unexpected token (1:10) #302

Open
Batman4496 opened this issue Jan 24, 2024 · 4 comments
Open

Module parse failed: Unexpected token (1:10) #302

Batman4496 opened this issue Jan 24, 2024 · 4 comments

Comments

@Batman4496
Copy link

I am currently trying to use chrome-aws-lambda v8 with puppeteer@8 in Nextjs but i am getting this error:


./node_modules/chrome-aws-lambda/build/puppeteer/lib/Browser.js.map
Module parse failed: Unexpected token (1:10)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> {"version":3,"file":"Browser.js","sourceRoot":"","sources":["../../../source/puppeteer/lib/Browser.ts"],"names":[],"mappings":";;AAGA,IAAI,KAAK,GAAuB,IAAI,CAAC;AAErC,IAAI;IACF,KAAK,GAAG,OAAO,CAAC,4CAA4C,CAAC,CAAC,OAAO,CAAC;CACvE;AAAC,OAAO,KAAK,EAAE;IACd,KAAK,GAAG,OAAO,CAAC,iDAAiD,CAAC,CAAC,OAAO,CAAC;CAC5E;AAED,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,KAAK,WAAW,GAAG,KAAa;IAC5D,IAAI,IAAI,GAAS,IAAI,CAAC;IACtB,IAAI,KAAK,GAAW,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IAEvC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KAChC;IAED,IAAI,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAErB,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAClD,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;YACtB,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;SACzB;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,IAAI,OAAO,GAAQ,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;AAE3C,KAAK,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,WAAW,GAAG,KAAa;IACxD,IAAI,IAAI,GAAS,MAAM,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAEtD,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAClD,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;YACtB,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;SACzB;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}

Import trace for requested module:
./node_modules/chrome-aws-lambda/build/puppeteer/lib/Browser.js.map
./node_modules/chrome-aws-lambda/build/puppeteer/lib/ sync ^\.\/.*$
./node_modules/chrome-aws-lambda/build/index.js
./src/lib/browser.ts
./src/lib/anime-drivers/gogoanime-driver.ts
./src/lib/anime-manager.ts
./src/app/api/sources/route.ts


package.json

"dependencies": {
    "@radix-ui/react-navigation-menu": "^1.1.4",
    "@radix-ui/react-slot": "^1.0.2",
    "@types/random-useragent": "^0.3.3",
    "antd": "^5.13.1",
    "axios": "^1.6.5",
    "cheerio": "^1.0.0-rc.12",
    "chrome-aws-lambda": "^8.0.2",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.0",
    "embla-carousel-react": "^8.0.0-rc19",
    "lucide-react": "^0.312.0",
    "next": "^14.0.4",
    "puppeteer": "^21.7.0",
    "puppeteer-core": "^8.0.0",
    "random-useragent": "^0.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "tailwind-merge": "^2.2.0",
    "tailwindcss-animate": "^1.0.7"
  },

@caldotdev
Copy link

I am having the same issue. Did you find a fix yet?

@ruthkangyr
Copy link

hi, can i ask if yall fixed it?

@YuvrajSingh4496
Copy link

hi, can i ask if yall fixed it?

Ah man, sadly no. I just gave up on it.

@silham
Copy link

silham commented May 10, 2024

I am having the same issue on next.js

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

5 participants