osseonews
(Osseo)
September 19, 2022, 3:31pm
1
We are trying to use the nhost-js package (nhost/packages/nhost-js at main · nhost/nhost · GitHub ). I’ve used tons of packages in the past, but for some reason with this one, we keep getting an error:
Code Error could not compute configurable props
What is this? Never seen this before. Our code is below. No different than how we always do this.
// To use any npm package, just import it
import { NhostClient } from '@nhost/nhost-js'
export default defineComponent({
async run({ steps, $ }) {
const nhost = new NhostClient({
subdomain: '<Your Nhost project subdomain>',
region: '<Your Nhost project region>'
})
//
},
})
osseonews
(Osseo)
September 23, 2022, 10:51am
2
@dylburger Has anyone from Pipedream been able to look into this? This is literally the only package, I can’t get to work on Pipedream and I just can’t figure out for the life of me. You can sign up for a free account at Nhost. Would appreciate any help. Thanks!
pierce
(Pierce)
September 23, 2022, 1:58pm
3
Hi @osseonews
I was able to reproduce the bug, simply importing that module seems to interfere with the Node.js code step initialization somehow.
Here’s a bug report you can comment and subscribe to:
opened 01:56PM - 23 Sep 22 UTC
bug
triaged
tracked internally
**Describe the bug**
When attempting to import the `NhostClient` from NPM, the … Pipedream code step breaks with a message:
`Code Error could not compute configurable props`
**To Reproduce**
Steps to reproduce the behavior:
1. Create a new Node.js code step
2. Attempt to import an version of the NHostClient
3. Test and observe error
```javascript
import { NhostClient } from '@nhost/nhost-js'
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return steps.trigger.event
},
})
```
**Expected behavior**
I expect to be able to import the Nhost Client.
**Screenshots**
<img width="984" alt="CleanShot 2022-09-23 at 09 56 14@2x" src="https://user-images.githubusercontent.com/2694734/191977009-ce76f05e-e888-498c-be3e-9ab5e87eea0e.png">
**Additional context**
Reported from community here:
https://pipedream.com/community/t/error-code-error-could-not-compute-configurable-props/3299
I tried older versions of the client, but the same error was happening. There may be a dependency on that client that’s not compatible with Pipedream.
I also encourage you to report this issue with the NHost as well.
dylburger
(Dylan Sather)
September 23, 2022, 5:48pm
4
@osseonews Do you know if the package relies on any headless browser like Puppeteer? What functionality does the client provide?
osseonews
(Osseo)
September 23, 2022, 6:07pm
5
Thanks for confirming! I will look at the package to see what it relies on.