Skip to content

React components not able to read variables from constants.json fileΒ #755

@tarun-veeraraghavan-mv

Description

@tarun-veeraraghavan-mv

Description

When I try running the client in local environment! I keep getting this error msg

[plugin:vite:import-analysis] Failed to resolve import "../../../constants.json" from "src/pages/Searching.jsx". Does the file exist?
/app/src/pages/Searching.jsx:15:7
30 | NEW_EVENT_STOP_SEARCH,
31 | NEW_EVENT_STOP_SEARCH_SUCCESS
32 | } from "../../../constants.json";

saying constants.json file does not exist

Screenshots

No response

Additional information

No response

Steps to Reproduce

Should make constants.json a regular .js file and export all variables or move it somewhere else

πŸ₯¦ Browser

Google Chrome

πŸ‘€ Have you checked if this issue has been raised before?

  • I checked and didn't find similar issue

🏒 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions