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

Node_modules directory needs to be manually moved into the repo's root directory in order for the scripts to run #2

Open
happarakka opened this issue May 11, 2023 · 1 comment

Comments

@happarakka
Copy link

Thank you for creating this TW migrator. I am very new to coding and node.js so it is quite likely that I ran into the following error because I set things up wrong. This is the error I got when I ran make:

Dependencies OK
Installing TiddlyWiki...
/home/USERNAME/.nvm/versions/node/v18.16.0/bin/npm install tiddlywiki

up to date, audited 2 packages in 392ms

found 0 vulnerabilities
Setting up temporary wiki...
/home/USERNAME/.nvm/versions/node/v18.16.0/bin/node node_modules/tiddlywiki/tiddlywiki.js tmp_wiki --init empty
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '/home/USERNAME/repos/tiddlywiki-migrator/node_modules/tiddlywiki/tiddlywiki.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.16.0
make: *** [Makefile:71: tmp_wiki/tiddlywiki.info] Error 1

I solved this by copying the node_modules directory from the user root directory into the root directory of the repo. Both make and make convert worked after this.

Is this a mistake on my part or is it a genuine issue?

@davidag
Copy link
Owner

davidag commented May 15, 2023

You're right @happarakka, I assumed that the tiddlywiki module is installed in the project root. The solution could be to add a package.json to this repo specifying the dependency. Then in make deps, run npm install.

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

2 participants