codedamn

Problem loading reference

Asked by Tina about a year ago

0

This is my frontend package.json

"name": "jeolight", "proxy": "http://localhost:7000", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.5", ... }

Then this is the server.js

1import express from 'express'; 2import data from './data.js'; 3 4const app = express(); 5 6app.get('/api/cars', (req, res) => { 7 res.send(data.cars); 8}); 9const port = process.env.PORT || 7000; 10app.listen(port, () => { 11 console.log(`server running at http://localhost:${port}`); 12});

Here's the problem

Problems loading reference 'https://json.schemastore.org/package': Unable to load schema from 'https://json.schemastore.org/package': getaddrinfo ENOTFOUND json.schemastore.org.

and on the console it is returning error status code 404 pls anyone with the solution?

1 Answer

    0

    Hey Tina,

    If this is a problem you're facing on a codedamn playground please enable read-only mode and share a link to the playground. However, If you're facing this issue on VSCode or any other local editor/IDE, a possible fix is to restart it. Check this out.

    NOTE: You seem to have set http://localhost:7000 as your proxy, but codedamn playgrounds only expose ports 1337 and 1338. This might also resolve your issue.

    Hope this helps!

    @mayanksh

    Mayank Sharma

    @mayanksh

Your answer