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

Running the commands in the Development section of the README does not create bin directory #188

Open
dahenson opened this issue Nov 25, 2024 · 2 comments

Comments

@dahenson
Copy link
Contributor

I am not a full-time JS developer, so I may be missing something, but I was unable to install the development environment as described, and I'm wondering if the developer steps could be more clear.

Steps taken:

  • Clone the repository and cd to the directory
  • Ran pnpm install (no errors or warnings related to xs-dev)
  • Ran pnpm link --global (no errors)
  • Ran xs-dev to check if it's installed, but no dice
  • Running pnpm install again resolves fine, except this output:
Lockfile is up to date, resolution step is skipped
Already up to date
 WARN  Failed to create bin at /home/redacted/Projects/hipsterbrown/xs-dev/node_modules/.bin/xs-dev. ENOENT: no such file or directory, open '/home/redacted/Projects/hipsterbrown/xs-dev/node_modules/xs-dev/build/src/cli.js'
 WARN  Failed to create bin at /home/redacted/Projects/hipsterbrown/xs-dev/node_modules/.bin/xs-dev. ENOENT: no such file or directory, open '/home/redacted/Projects/hipsterbrown/xs-dev/node_modules/xs-dev/build/src/cli.js'
Done in 3.7s

Workaround

I can currently run pnpm xs-dev <command> in order to continue local development.

Environment

Operating system: Fedora 40
Node version: v23.3.0 (installed via asdf)
pnpm version: 9.14.2

@dahenson dahenson changed the title Running the commands in the Development section does not create bin directory Running the commands in the Development section of the README does not create bin directory Nov 25, 2024
@HipsterBrown
Copy link
Owner

Using pnpm xs-dev is the recommended way of running the CLI during development because it will compile it on the fly, otherwise pnpm compile will output the expected cli.js in the build directory.

@dahenson
Copy link
Contributor Author

dahenson commented Nov 27, 2024

The "Development" section in the README led me to believe that running the following steps would give me what I needed to run xs-dev from the current branch:

git clone https://github.com/HipsterBrown/xs-dev.git
cd xs-dev
pnpm install
pnpm link --global
pnpm link --global xs-dev

However, what you're saying is that testing xs-dev from your development environment requires running pnpm compile every time, or running pnpm xs-dev to try current changes. Could it be worded differently, or is this just common knowledge for JS devs? This tooling is all new to me, so I'm in the dark about pnpm, etc.

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