Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this still working? #31

Open
justdvl opened this issue Jan 19, 2022 · 1 comment
Open

Is this still working? #31

justdvl opened this issue Jan 19, 2022 · 1 comment

Comments

@justdvl
Copy link

justdvl commented Jan 19, 2022

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?

@aitoraznar
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants