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

Can not install command line tool #10

Closed
tbdalgaard opened this issue Jan 3, 2023 · 10 comments
Closed

Can not install command line tool #10

tbdalgaard opened this issue Jan 3, 2023 · 10 comments

Comments

@tbdalgaard
Copy link

Have tried to install Djot.js several times.

I have to run the install script as sudo to get it to work since the admin user doesn't have the right levels of permisions to the /usr/local/lib/node_modules directory where Djot can be installed.

When I type
djot into the terminal it says: Command not found.
I installed Node.js from their website instead of using Homebrew hoping this would give better results.

@jgm
Copy link
Owner

jgm commented Jan 3, 2023

Did the installation succeed? Do you see djot in /usr/local/bin? If so, is /usr/local/bin in your PATH?

Alternatively you can install your global npm packages in your user directory (and not need sudo):

mkdir ~/.npm-packages
npm config set prefix ~/.npm-packages
npm install -g .

djot should then be in ~/.npm-packages/bin, which you'd ned to add to your PATH.

@jgm jgm closed this as completed Jan 4, 2023
@tbdalgaard
Copy link
Author

No, I do not see djot in /usr/local/bin even when I ran the installer as sudo. I did not get any errors while installing so wonder what failed and how I can debug this.

@jgm
Copy link
Owner

jgm commented Jan 4, 2023

Try the approach above for a user directory install.

@tbdalgaard
Copy link
Author

tbdalgaard commented Jan 6, 2023 via email

@tbdalgaard
Copy link
Author

tbdalgaard commented Jan 6, 2023 via email

@jgm
Copy link
Owner

jgm commented Jan 6, 2023

This is because I unpublished the package (we're thinking of a different name). Try this:

npm install -g https://github.com/jgm/djot.js

I can try to fix npm run build so it doesn't assume a global install of tsc.

jgm added a commit that referenced this issue Jan 6, 2023
so we don't presuppose a global install. See #10.
@tbdalgaard
Copy link
Author

tbdalgaard commented Jan 6, 2023 via email

@jgm
Copy link
Owner

jgm commented Jan 6, 2023

I think I've now fixed the tsc issue.
Once we get this published on npm it should be a simple npm install -g djot (or whatever the npm name turns out to be).

@tbdalgaard
Copy link
Author

tbdalgaard commented Jan 6, 2023 via email

@jgm
Copy link
Owner

jgm commented Jan 6, 2023

Glad to hear you finally got it to work!
Feel free to make comments in the discussion area.

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