floccusaddon / floccus

:cloud: Sync your bookmarks privately across browsers and devices
https://floccus.org
Mozilla Public License 2.0
5.89k stars 241 forks source link

Instructions in "Setting up a dev environment" are not working #1284

Closed heapifyman closed 2 years ago

heapifyman commented 2 years ago

Which version of floccus are you using?

4.17.1

Sync method

Nextcloud Bookmarks

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

No response

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

Following the instructions in Setting up a dev environment results in an error when running gulp:

gulp: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed.
[1]    111467 IOT instruction (core dumped)  gulp

It appears to be this issue: https://github.com/laverdet/node-fibers/issues/451

Apparently, fibers is not compatible with node v16 or higher. See also https://github.com/laverdet/node-fibers#readme

Expected Behavior

Running gulp should succeed.

To Reproduce

  1. Follow the instructions in Setting up a dev environment

Debug log provided

pinpontitit commented 2 years ago

Yes I already spoke about that with the dev, but for an older version. He asked me if I could rewrite the doc with my discoveries, but I always report. I'll do it soon.

But the error you have doesnt look like those I had at the time...

Could you try something and tell me if it works ?

First, try using Node 14.17.0.

If it doesn't work, check this discussion for more steps from the creator.

If you get it to work, tell me also if using Node 14.17 was enough, or if you had to do something else that you read in the discussion I provided above (or something else you found online).

It would help me for writing the new steps on the README.md.

heapifyman commented 2 years ago

With node 14 there's an issue with package-lock versions. npm bundled with node 14 still uses package-lock version 1, node 16 switched to version 2, and the current package-lock.json file is also in that format. So you'll get a warning:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

And that leads to some follow-up errors down the road.

After some tests, this is what worked in the end on a freshly cloned repo:

  1. Clone repo
  2. Install node 14, e.g. nvm install lts/fermium
  3. Delete package-lock.json: rm package-lock.json
  4. Install dependencies: npm install
  5. Build: npx gulp

But I don't think that this is a sustainable solution because node 14 will be EOL after April 2023 - see https://github.com/nodejs/release#release-schedule

Even node 16 will only be maintained until September 2023 - https://nodejs.org/en/blog/announcements/nodejs16-eol/

Something needs to be done to make this project work with the current node LTS version (18 at the moment).

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.