2

I'm trying to create an imageboard by building from cloned github repositories. I'm using npm for this, but for reasons I'm not quite sure of, I'm met with errors that I will post below.

I've tried to alleviate this by running: npm cache clean --force, followed by: rm -rf node_modules, and then followed by: rm -rf package-lock.json.

After all of this, I ran npm install && npm run dev once more, and yet still, I was met with the exact same errors.

Initial commands used: git clone https://gitgud.io/millchan/Millchan.git npm install && npm run dev

First off, I do: git clone https://gitgud.io/millchan/Millchan.git, and then I do: cd ~/millchan. The "millchan" folder is the one created from cloning the repositories.

Then, afterwards...

k24
  • 31
  • 2
  • can you add the script part of your package.json to see what 'dev' does or tries to do? – rebecca Jul 16 '19 at 08:04
  • @rebecca `"dev": "webpack --mode development --config webpack.config.js --watch --env.development",` – k24 Jul 16 '19 at 08:29
  • ah well. i guess i need the webpack config too, also could you include them in your post for better formatting? the error message from dev is suggesting that your project "should" be a git project or rather it fails because it's not, see ln 9 from your second pastebin – rebecca Jul 16 '19 at 08:32
  • @rebecca Hello again, and thank you for your assistance so far. Unfortunately, I really can't include much else in my post due to character limit, and due to the fact that the site's AI will most likely render my pastes as spam. webpack.config.js: -> https://pastebin.com/RUWDBXTA – k24 Jul 16 '19 at 20:10
  • is the project your currently working in a git-project? otherwise i think this part `let commitHash = require('child_process').execSync('git rev-parse --short HEAD').toString();`in the beginning of your webpack.config is causing the error. maybe try removing it and see what happens? – rebecca Jul 17 '19 at 08:26
  • according to this Error: Command failed: git rev-parse --short HEAD fatal: not a git repository (or any of the parent directories): .git – rebecca Jul 17 '19 at 08:28
  • @rebecca My project is a git-project, yes. Also, after removing `let commitHash = require('child_process').execSync('git rev-parse --short HEAD').toString();` and running the rest of the commands again, I'm still met with the exact same errors. – k24 Jul 17 '19 at 17:06
  • ah shoot, i guess that would've been too easy. what node version are you running? maybe there are some incompatabilities...? – rebecca Jul 18 '19 at 07:10
  • @rebecca I'm running node version 12.6.0. – k24 Jul 18 '19 at 11:49
  • did you also add " the gnu compiler collection for c++, which is gcc-c++ for fedora or g++ for debian." per the project? i'm sorry, i'm just pulling on straws here... another suggestion would be to delete everything and make a new clean copy and try again :/ – rebecca Jul 18 '19 at 11:58
  • @rebecca I've installed g++, yes. Also, unfortunately, I've reinstalled everything before, to no avail. But, I'll try again this time. Thank you for helping me so far. I'm always open to more assistance if you ever come up with more ideas. – k24 Jul 18 '19 at 21:34
  • unfortunately, i have no real ideas left, wish i could've helped you more. you could raise an issue with the original project, maybe they can help you out or encountered something similar before, otherwise, no clue :/ – rebecca Jul 19 '19 at 08:33
  • 1
    hey, i researched a little more, especially regarding the first git error. i still think the problem lays there... could you try a `git init` in your project folder? see [here](https://errorcodespro.com/4-fixes-for-fatal-not-a-git-repository-or-any-of-the-parent-directories-git/) and [here](https://stackoverflow.com/questions/11961600/fatal-not-a-git-repository-or-any-of-the-parent-directories-from-git-status/11961642) – rebecca Jul 19 '19 at 10:49
  • @rebecca Extremely late, but your last comment completely solved my issue. Thank you very much. – k24 Sep 04 '21 at 13:30

0 Answers0