Coder Social home page Coder Social logo

Comments (4)

xarantolus avatar xarantolus commented on May 24, 2024

Thanks for the report.

Usually the server should ignore if the file doesn't exist and assume that there are zero entries in the archive.
I tried installing the server from scratch using the same node version (but on Windows) and was able to start it without problems, so I'm not sure if this can help you:

  • Add a site to the archive by going to http://yourserver:port/new directly and entering any site you want. The content file is first created when the server finished downloading the first entry. After this, the error might go away.

  • You could create the file at /path/to/Collect/Collect/public/s/content.json manually. The default content for this file is []. After a restart (or even just a website reload) the website should display that there are no sites in the archive.

  • If it is related to some kind of permission error (maybe when creating the file; but this should log an error to the console) you might get a different result when changing permissions of the s directory; but I believe that this is not the case as you used sudo

  • The last option I can think of would be using a different node version. I use node v10.14.2 and npm 6.4.1 on a Raspberry Pi and haven't encountered this problem yet

from collect.

SuperSandro2000 avatar SuperSandro2000 commented on May 24, 2024
  • Add a site to the archive by going to http://yourserver:port/new directly and entering any site you want. The content file is first created when the server finished downloading the first entry. After this, the error might go away.

Then I get this error.

Processing url https://github.com/xarantolus/Collect
Error while processing url https://github.com/xarantolus/Collect:
Error: ENOENT: no such file or directory, open 'public/s/content.json'
{ Error: ENOENT: no such file or directory, open 'public/s/content.json'
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'public/s/content.json' }
  • You could create the file at /path/to/Collect/Collect/public/s/content.json manually. The default content for this file is []. After a restart (or even just a website reload) the website should display that there are no sites in the archive.

This worked. Hope this is enough for you to fix it. If you need to test something hit me up and I can test it for you.

  • If it is related to some kind of permission error (maybe when creating the file; but this should log an error to the console) you might get a different result when changing permissions of the s directory; but I believe that this is not the case as you used sudo

yeah, should not be the problem.

  • The last option I can think of would be using a different node version. I use node v10.14.2 and npm 6.4.1 on a Raspberry Pi and haven't encountered this problem yet

I updated node and the same happened.

from collect.

xarantolus avatar xarantolus commented on May 24, 2024

I think the problem was that it only checked a specific error number that seems to only work on Windows. From now on, the server automatically generates the file so that it always exists, but it also checks the more generic error code ENOENT if it doesn't.

If you want to test it on your system, you can download the new version and see if it still throws the error if the file doesn't exist. (But watch out, if you delete the content.json file all directories with websites will be deleted automatically, so it might be better to install it somewhere else and delete it after that)

from collect.

SuperSandro2000 avatar SuperSandro2000 commented on May 24, 2024

works now.
I don't know if you have tests but maybe you should think about doing some or test it from time to time on linux on a server or vm just to make sure that the program works.

from collect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.