Update / harden install instructions #15

Closed
opened 2023-01-11 16:28:30 +00:00 by zramsay · 2 comments
Member

Using the current instruction, I ran into this error. It was solved by running $ ./node_modules/.bin/tsc and I was able to continue with the tutorial

root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 18.45s.
root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# 
root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# ./bin/laconic 
node:internal/modules/cjs/loader:959
  throw err;
  ^

Error: Cannot find module '../dist/index.js'
Require stack:
- /root/laconic-registry-cli/bin/laconic
    at Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1022:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/root/laconic-registry-cli/bin/laconic:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
    at Module.load (node:internal/modules/cjs/loader:998:32)
    at Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/root/laconic-registry-cli/bin/laconic' ]
}

Node.js v18.7.0
root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# ./node_modules/.bin/tsc 
root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# ./bin/laconic 
laconic <command>

related to #3, #4

Using the current instruction, I ran into this error. It was solved by running `$ ./node_modules/.bin/tsc` and I was able to continue with the tutorial ``` root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# yarn yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... Done in 18.45s. root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# ./bin/laconic node:internal/modules/cjs/loader:959 throw err; ^ Error: Cannot find module '../dist/index.js' Require stack: - /root/laconic-registry-cli/bin/laconic at Module._resolveFilename (node:internal/modules/cjs/loader:956:15) at Module._load (node:internal/modules/cjs/loader:804:27) at Module.require (node:internal/modules/cjs/loader:1022:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/root/laconic-registry-cli/bin/laconic:3:1) at Module._compile (node:internal/modules/cjs/loader:1120:14) at Module._extensions..js (node:internal/modules/cjs/loader:1174:10) at Module.load (node:internal/modules/cjs/loader:998:32) at Module._load (node:internal/modules/cjs/loader:839:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/root/laconic-registry-cli/bin/laconic' ] } Node.js v18.7.0 root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# ./node_modules/.bin/tsc root@ubuntu-s-4vcpu-8gb-tor1-01:~/laconic-registry-cli# ./bin/laconic laconic <command> ``` related to #3, #4
Contributor

I'm not sure this is the right solution. Solution should probably be to run:

$ yarn global add $PWD

See: https://github.com/yarnpkg/yarn/issues/5199

Note also that casual users shouldn't be building and running the project in this manner at all (this is what you'd do if you were a developer modifying the code and testing it out).

Users should either install from some npm registry they use:

$ <configure registry>
$ yarn global add @cerc-io/laconic-registry-cli
$ <now I can run  "laconic">

or they should build from source using stack orchestrator and then either install as above from their local npm registry.
or run the container cerc/laconic-registry-cli (note this container isn't fully tested yet and may not work right now).
See: https://github.com/cerc-io/stack-orchestrator/blob/main/app/data/container-build/cerc-laconic-registry-cli/Dockerfile#L55

I'm not sure this is the right solution. Solution should probably be to run: ``` $ yarn global add $PWD ``` See: https://github.com/yarnpkg/yarn/issues/5199 Note also that casual users shouldn't be building and running the project in this manner at all (this is what you'd do if you were a developer modifying the code and testing it out). Users should either install from some npm registry they use: ``` $ <configure registry> $ yarn global add @cerc-io/laconic-registry-cli $ <now I can run "laconic"> ``` or they should build from source using stack orchestrator and then either install as above from their local npm registry. or run the container `cerc/laconic-registry-cli` (note this container isn't fully tested yet and may not work right now). See: https://github.com/cerc-io/stack-orchestrator/blob/main/app/data/container-build/cerc-laconic-registry-cli/Dockerfile#L55
Author
Member

handled by SO, readme overhaul incoming

handled by SO, readme overhaul incoming
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cerc-io/laconic-registry-cli#15