question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI Error: react-static-create(1) does not exist

See original GitHub issue

Describe the bug The CLI command

react-static create

shows an error.

To Reproduce I just installed react-static globally using

yarn global add react-static (latest version of yarn 1.10.1)

If I launch

react-static create

I receive the error error: react-static-create(1) does not exist, try --help

The help command is the only which works.

I’m using Node 10.9.0 on a Mac with MacOS Sierra 10.12.6.

I fear it’s a problem with my environment, but other CLIs like create-react-app, gatsby or next work well.

Thank you, Matteo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:19

github_iconTop GitHub Comments

3reactions
dan-drcommented, Nov 24, 2018

yeah why is this closed… still happening. thanks for the workaround @luskin

3reactions
AubreyHewescommented, Nov 13, 2018

I have the same problem… I also have found a workaround/resolution

It seems that it is indeed due to the installed symlink pointing to a relative path that is breaking as commander does not follow. If you execute the command directly it works… see workaround/solution below.

Environment

$ lsb_release -ds && uname -rv && node -v && yarn -v && react-static -V
Ubuntu 17.10
4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018
v8.12.0
1.12.3
5.9.12

Reproduce

Remove the global package
yarn global remove react-static
Check it is no longer available
which react-static

Above should have no output

Add the global package
yarn global add react-static
Check it is now available
which react-static

Above should have output pointing to something like /home/X/.local/bin/react-static

Try to create a project
react-static create

Above fails with error: react-static-create(1) does not exist, try --help

Check the command
ls -lad $(which react-static)

Above outputs something like /home/X/.local/bin/react-static -> ../../.config/yarn/global/node_modules/.bin/react-static

Note the ../../ in the symlink; it seems this is the problem

Try using the command directly; so the command the symlink points to
$(readlink -f $(which react-static)) create

The above works…

? What should we name this project? my-static-site

Workaround/Solution

Make the symlink absolute

ln -fs $(readlink -f $(which react-static)) $(which react-static)
ls -lad $(which react-static)

Outputs: /home/X/.local/bin/react-static -> /home/X/.config/yarn/global/node_modules/react-static/bin/react-static

The symlink is now absolute and the command works 😉

react-static create

? What should we name this project? my-static-site

@tannerlinsley postinstall hook? as it seems to be a problem with the commander package

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-static | Yarn - Package Manager
If this is a problem, you can use the process.env.REACT_STATIC_THREAD === 'true' condition to detect if the instance is a threaded export slave...
Read more >
can't resolve 'file-loader' | The AI Search Engine You Control
npm install sass-loader -D npm install node-sass -D. Open side panel. Can't resolve 'css-loader!autoprefixer-loader'. Asked May 9, 2018 • 1 votes 1 answer....
Read more >
Build a Complete Jamstack App with CockroachDB and Netlify ...
Let's explore how to use React-Static to generate our static Jamstack application. This application will store data in a CockroachDB using ...
Read more >
Gatsby vs. React Static vs. Next.js - IONOS Deploy Now
Gatsby is one of the more well-known React frameworks because it is very versatile and has a robust development team driving its growth....
Read more >
Error: A column was specified that does not exist. 0. Failed to ...
0. Failed to execute (GeneratePathways). Error Message. In ArcGIS Pro, when running the Generate Pathways tool with ArcGIS Indoors, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found