yakivmospan / github-wikito-converter

Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
Other
296 stars 52 forks source link

`npm` fails with `Error: Cannot find module 'babel-core'`. #73

Open dreirund opened 2 years ago

dreirund commented 2 years ago

npm build gives me an error Error: Cannot find module 'babel-core':


> github-wikito-converter@1.5.3 build
> rm -rf dist/* && ./node_modules/.bin/babel src --out-dir dist --source-maps

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'babel-core'
Require stack:
- /home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/lib/babel/index.js
- /home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/bin/babel.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/lib/babel/index.js:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/lib/babel/index.js',
    '/home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/bin/babel.js'
  ]
}

Node.js v17.6.0

I have no idea how npm works, but a npm install babel-core did not solve this.

amc1999 commented 1 year ago

There is a fork and it does work with npm v18.x.x, you can try it:

git clone https://github.com/openmpp/github-wikito-converter gwtc
cd gwtc
npm install
npm run build

Hope this helps

dreirund commented 1 year ago

There is a fork and it does work with npm v18.x.x, you can try it:

git clone https://github.com/openmpp/github-wikito-converter gwtc
cd gwtc
npm install
npm run build

Hope this helps

Thank you for this.

It has gotten a dependency hell (when I want to make proper GNU/Linux packaging). So I give up on this and I flagged my Arch Linux user repository package for this reason for deletion.

Regards!