npmcharts.com icon indicating copy to clipboard operation
npmcharts.com copied to clipboard

Suggestions for improving the README to start the project in development mode

Open Borewit opened this issue 8 months ago • 0 comments

I think the README could use some improvement to get this great project up and running.

I run into trouble in this section:

Run cd ../../ and then npm start. You are all set! The project will be running on port 3896.

  • There is no start script in the root package.json, only in the server portion

  • Better to use yarn start I suppose, as that this is the package manager.

  • Under the assumption I should run the server start script, I run into the following error:

    file:///home/borewit/code/borewit/npmcharts.com/packages/utils/getOembedObject.js:1
    const { getTitle } = require('./getTitle');
                       ^
    
    ReferenceError: require is not defined in ES module scope, you can use import instead
    

    I worked around that, by adding:

    "type": "commonjs",
    

    to packages/server/package.sjon

  • Following the README, going to http://localhost:3896/chart-image/vue.png seems to point to a static chart, so I to go http://localhost:3896/ instead.

  • Next problem with the run script in the server portion, is that in seem to miss artifacts, resulting in 404.

  • I got that working by running yarn build in the root

After those steps I manages to get the chart running, but not I a proper development mode, where code changes are populated to the browser.

Borewit avatar Apr 24 '25 14:04 Borewit