fetch icon indicating copy to clipboard operation
fetch copied to clipboard

Is this still working?

Open david-vendel opened this issue 4 years ago • 1 comments

Hello, I cloned this repo locally and inside example/create-react-app I run npm install, npm start. I get this error:

Failed to compile.

For the selected environment is no default script chunk format available: JSONP Array push can be chosen when 'document' or 'importScripts' is available. CommonJs exports can be chosen when 'require' or node builtins are available. Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly.

I also tried to include this library into my project, but I am getting TS error (which I don't know how to fix)

error - TypeError: Url must be a string. Received undefined

image

Can someone pinpoint me to what to do? Is there a Codesandbox example of this library?

david-vendel avatar Jan 19 '22 10:01 david-vendel

Hi @justdvl, did you set up the endpoint URL?

const client = new Client(${process.env.NEXT_PUBLIC_WORDPRESS_URL}/wp-json);

I'm a developer that started using this library a week ago and it worked for us.

aitoraznar avatar Jan 25 '22 12:01 aitoraznar