GithubHelp home page GithubHelp logo

Comments (9)

benjaminwood avatar benjaminwood commented on May 21, 2024 1

👍 I'll close this out now.

Ps. I've got a PR coming your way for another small bugfix.

from serverless-chrome.

adieuadieu avatar adieuadieu commented on May 21, 2024

Hi @benjaminwood,

Hm.. That's a weird/unexpected error. I haven't had a chance to thoroughly test the plugin together with serverless-offline, so can't say that it should work. I wouldn't entirely be surprised if it didn't. The serverless-chrome plugin currently only somewhat lazily hooks into the serverless-offline hooks. However, you shouldn't be getting the error you're seeing.

Would you be able to share your code? Specifically of interest is your package.json and the handler code (you can omit any business logic.)

from serverless-chrome.

benjaminwood avatar benjaminwood commented on May 21, 2024

Hey @adieuadieu thanks for the quick response! I just recreated the problem in a simpler scenario.

It appears that I either have an issue with my environment (likely?) or there is a problem with the package. I just went through the following:

  • mkdir test
  • cd test
  • yarn add --dev serverless-plugin-chrome
  • node -e "require('serverless-plugin-chrome')"

I can install and require other packages this way, but not serverless-plugin-chrome. Strange huh?

from serverless-chrome.

adieuadieu avatar adieuadieu commented on May 21, 2024

Ah.

I just published a new version to NPM. Could upgrade serverless-plugin-chrome and try again?

Also, just to clarify: You don't need to include serverless-plugin-chrome directly into your code. Adding it to serverless.yml's plugins section should be all you need to do (besides yarn/npm installing it.)

from serverless-chrome.

benjaminwood avatar benjaminwood commented on May 21, 2024

Funny! I was just poking around in package.json and noticed dist/index.cjs.js.

I see the change you made, and I suspect this is the problem I'm running into. However, there is no dist directory in the new version. Perhaps you forgot to include it in the new package/version?

Regarding requiring serverless-plugin-chrome, I was only requiring it manually to see if I could recreate the issue outside of serverless, serverless-offline, etc.

from serverless-chrome.

adieuadieu avatar adieuadieu commented on May 21, 2024

Hm.. Looks like I ran into this issue with NPM. Just published a new new version.

from serverless-chrome.

benjaminwood avatar benjaminwood commented on May 21, 2024

It works!!!

from serverless-chrome.

benjaminwood avatar benjaminwood commented on May 21, 2024

Thanks for your help and thanks again for your work on this project. Are you on gitter chat or anything similar?

from serverless-chrome.

adieuadieu avatar adieuadieu commented on May 21, 2024

Great! Glad to hear it works for you now. I'm occasionally on Gitter, but not very active.

from serverless-chrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.