Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locally installed wiki converter can't find things #67

Open
jsoref opened this issue May 2, 2021 · 0 comments
Open

locally installed wiki converter can't find things #67

jsoref opened this issue May 2, 2021 · 0 comments

Comments

@jsoref
Copy link

jsoref commented May 2, 2021

Steps

$ yarn add github-wikito-converter
$ ./node_modules/.bin/gwtc -d .                                              
(node:44111) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Unhandled rejection Error: ENOENT: no such file or directory, stat '/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/node_modules/jquery/dist/jquery.min.js'
    at Object.statSync (node:fs:1141:3)
    at Object.statSync (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/graceful-fs/polyfills.js:312:16)
    at Object.copySync (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/fs-extra/lib/copy-sync/copy-sync.js:20:58)
    at WikiConverter.<anonymous> (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/dist/wiki-converter.js:166:12)
    at Array.forEach (<anonymous>)
    at WikiConverter.copyAssets (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/dist/wiki-converter.js:165:19)
    at WikiConverter.<anonymous> (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/dist/wiki-converter.js:54:16)
    at tryCatcher (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate (node:internal/timers:464:21)

Workaround

--- node_modules/github-wikito-converter/dist/wiki-converter.js 2021-05-02 12:37:52.000000000 -0400
+++ node_modules.0/github-wikito-converter/dist/wiki-converter.js       2021-05-02 12:41:42.000000000 -0400
@@ -135,7 +135,7 @@
     key: "computeCssFiles",
     value: function computeCssFiles() {
 
-      this.cssFiles = [path.join(__dirname, '..', 'node_modules', 'bootstrap', 'dist', 'css', 'bootstrap.min.css'), path.join(__dirname, '..', 'node_modules', 'highlight.js', 'styles', 'default.css'), path.join(__dirname, '..', 'node_modules', 'highlight.js', 'styles', this.options.highlightTheme + '.css'), path.join(this.cssPath, 'doc.css')];
+      this.cssFiles = [path.join(__dirname, '..', '..', '..', 'node_modules', 'bootstrap', 'dist', 'css', 'bootstrap.min.css'), path.join(__dirname, '..', '..', '..', 'node_modules', 'highlight.js', 'styles', 'default.css'), path.join(__dirname, '..', '..', '..', 'node_modules', 'highlight.js', 'styles', this.options.highlightTheme + '.css'), path.join(this.cssPath, 'doc.css')];
 
       this.options.userCssFile && this.cssFiles.push(path.resolve(this.options.userCssFile));
       return this;
@@ -149,7 +149,7 @@
     key: "computeJsFiles",
     value: function computeJsFiles() {
 
-      this.jsFiles = [path.join(__dirname, '..', 'node_modules', 'jquery', 'dist', 'jquery.min.js'), path.join(__dirname, '..', 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.min.js')];
+      this.jsFiles = [path.join(__dirname, '..', '..', '..', 'node_modules', 'jquery', 'dist', 'jquery.min.js'), path.join(__dirname, '..', '..', '..', 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.min.js')];
 
       this.options.userJsFile && this.jsFiles.push(path.resolve(this.options.userJsFile));
       return this;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant