acquia / waterwheel.js

A generic JavaScript helper library to query and manipulate Drupal 8 via core REST and JSON API
https://github.com/acquia/waterwheel.js
233 stars 26 forks source link

'Unknown error' with status 500 using latest release #69

Open sheelah opened 6 years ago

sheelah commented 6 years ago

I'm getting an 'Unknown error' with 500 status returned when I use the latest version of Waterwheel (v1.3.7) to make get requests. If I revert to using v1.3.6, everything is fine. Were there any other changes in the last release?

Here's a node script to re-create the issue: https://gist.github.com/sheelah/002e56763f38c3507d6dc7c0641aeb2e

Steps

$ npm install waterwheel@v1.3.7
$ node index.js // run my Gist
{ Error: Unknown error.
    at /Users/sbrennan/src/experimental/d8/node_modules/waterwheel/dist/waterwheel.js:1:5256
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:684:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:613:3 message: 'Unknown error.', status: 500 }
$ npm install waterwheel@v1.3.6
$ node index.js
{ data:
   [ { type: 'recipes',
       id: 'a542e833-edfe-44a3-a6f1-7358b115af4b',
       attributes: [Object],
       relationships: [Object],
       links: [Object] },
     { type: 'recipes',
       id: '84cfaa18-faca-471f-bfa5-fbb8c199d039',
       attributes: [Object],
       relationships: [Object],
       links: [Object] },
     { type: 'recipes',
       id: '1c134a16-01ab-4133-ae1f-6e078fe1f64b',
...

Thanks!

sheelah commented 6 years ago

Another data point here: Noticed all works fine with v1.3.7 if I edit my local version of this repo's package.json, changing main back to:

"main": "lib/waterwheel.js",

(I'm not using Webpack)

liborvanek commented 6 years ago

I can confirm.

capriosa commented 6 years ago

For me it doesn't work with 1.3.6 and not with 1.3.7 I changed package.json of waterwheel to "main": "lib/waterwheel.js" Now it works.

capriosa commented 6 years ago

But this workaround is not a solution. It's not deployable.

tim-yao commented 6 years ago

Still have this issue. I am using it with Nuxt.js. Change main from "dist/waterwheel.js" to "lib/waterwheel.js" removed the error. Need fix.