ambitious-aqua
ambitious-aqua4mo ago

Error Creating New Refine App

Hello all, I am running into errors trying to start a new refine app. Here is what I did: npm create refine-app@latest
✔ Downloaded remote source successfully.
✔ Choose a project template · refine-vite
✔ What would you like to name your project?: · frontend
✔ Choose your backend service to connect: · data-provider-custom-json-rest
✔ Do you want to use a UI Framework?: · chakra
✔ Do you want to add example pages?: · inferencer
✔ Do you need any Authentication logic?: · auth-provider-google
✔ Do you need i18n (Internationalization) support?: · no
✔ Choose a package manager: · npm
✔ Downloaded remote source successfully.
✔ Choose a project template · refine-vite
✔ What would you like to name your project?: · frontend
✔ Choose your backend service to connect: · data-provider-custom-json-rest
✔ Do you want to use a UI Framework?: · chakra
✔ Do you want to add example pages?: · inferencer
✔ Do you need any Authentication logic?: · auth-provider-google
✔ Do you need i18n (Internationalization) support?: · no
✔ Choose a package manager: · npm
When running npm run dev I get this error:
✘ [ERROR] Could not resolve "graphql"

node_modules/graphql-tag/lib/index.js:2:22:
2 │ import { parse } from 'graphql';
╵ ~~~~~~~~~

You can mark the path "graphql" as external to exclude it from the bundle, which will remove this error.
✘ [ERROR] Could not resolve "graphql"

node_modules/graphql-tag/lib/index.js:2:22:
2 │ import { parse } from 'graphql';
╵ ~~~~~~~~~

You can mark the path "graphql" as external to exclude it from the bundle, which will remove this error.
I am not sure what depends on graphql, so i don't want to remove it. Seeing as this is just a simple refine app created from the official CLI, I am assuming this should work out of the box, but I may be wrong based on my configuration. Thanks!
3 Replies
kapa.ai
kapa.ai4mo ago
Hi @Nick Montoya. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry to hear that you're having trouble starting your new Refine app. Based on the information provided in the extracts, it's not immediately clear what could be causing the error you're encountering. However, it's worth noting that the graphql package is a common dependency for many JavaScript projects, and it's possible that one of the options you selected during the setup process requires it. If you haven't already, you might try installing the graphql package manually using npm:
npm install graphql
npm install graphql
Then, try running your app again:
npm run dev
npm run dev
If the problem persists, it would be helpful to have more information about your development environment, such as your Node.js and npm versions. Also, you might want to check the Refine GitHub Issues (https://github.com/refinedev/refine/issues) to see if anyone else has reported a similar problem, or to report a new issue if necessary. I hope this helps, and I wish you the best of luck with your project! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@263527875506995202> kapa.ai is still learning and improving, please let us know how it did by reacting below
eager-peach
eager-peach4mo ago
Hello @Nick Montoya thanks for the report! We'll fix it, in the meantime, you can install graphql-tag package as dev dependecy as a workaround