question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find any-observable

See original GitHub issue

I ran into the issue as mentioned in the title and as it is documented here. I was able to fix it as the documentation suggested, however it is

  1. suboptimal, because it requires to move the shared library code into every application library
  2. also really weird to me. I don’t understand what the underlying issue is, ie how the shared library code causes the error.

Note: The PR that fixed it for me is here - specifically deleting the faast.useCase.ts file that exports a FaastUseCase class that abstracts faast implementation for downstream code.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
acchoucommented, Sep 21, 2020

BTW you can now add credentials to faastAws as part of AwsOptions, see #527.

1reaction
acchoucommented, Sep 17, 2020

Basically the issue is that faast cannot be used in the remote module because faast cannot pack itself up. In theory it’s possible you might want to invoke a lambda function from within a lambda function, but for now that cannot be done by importing faast into the remote module. Most likely, that’s not what you were trying to do in the first place…

The documentation refers to a case where the remote module and local code both imported a common file, which contained a utility function that used FaastError imported from faast itself. In this case, the utility function was only used on the local side (in the remote code, there’s no point in checking for a timeout, it’s just reported as an error to the caller). But when a faast is called on the remote code, it uses webpack to package the code for execution on lambda. When webpack runs, it finds all the dependencies of the remote code, including faast itself, through the importing of FaastError. When webpack tries to pack up faast, it fails because some of the dependencies of faast are not statically determined (for example, webpack itself. So you might say that “faast cannot be used on itself because it depends on webpack, and webpack cannot webpack itself”).

The solution was simple: just move the utility function that used FaastError into a non-shared file that was only imported on the local side, not the remote module. There’s no point in trying to see timeout errors on the remote side, after all. It was just a spurious dependency.

If you could share a little about how you’re using faast.js, I’d be happy to give some pointers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint error : Cannot find any-observable implementation nor ...
I had a similar issue. I deleted the package-lock.json and the node-modules folder, run npm install and everything was fixed.
Read more >
Cannot find any-observable implementation nor global ...
I tried to update cypress on example project cypress-example-kitchensink and got another output: 23 vulnerabilities (15 low, 1 moderate, 7 high) , but...
Read more >
any-observable - npm
Support any Observable library and polyfill. ... Start using any-observable in your project by running `npm i any-observable`.
Read more >
Eslint error : Cannot find any-observable implementation nor global ...
I have precommit hook that does eslint checks. After installation is started to throw this error: C:\XXX\node_modules\any-observable\register.js:29 throw new ...
Read more >
Ghost-CLI "Cannot find any-observable implementation" error
Hello, I had an old Ghost installation (from before 1.0) so I said why not try to set up the newest one. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found