Help me to install react and babel webpacks, please

Hi everybody! I’m very new at programming and I’m stuck trying to install react on my virtual machine. I use Vagrant and scotch-box.
Here’s the list of commands
Git bash (windows 7):

  1. cd d:
  2. git clone my-project
  3. cd \my-project
  4. vagrant up
  5. vagrant ssh
  6. cd /var/www/public
  7. npm init
  8. npm install react react-dom --no-bin-links (–save didn’t work)
  9. npm install babel-loader babel-core babel-preset-es2015 babel-preset-react --no-bin-links
  10. npm install babel webpack webpack-dev-server --no-bin-links
  11. touch index.html App.js main.js webpack.config.js
    then I’ve followed the guidance from the egghead site, linked to react install and changed the files from stage 10.
  12. npm start
    When I call “npm start” it shows me an error (pinned to message).
    Thank you a lot!

It keeps saying that webpack-dev-server wasn’t found, so was it installed proprely? --no-bin-links sounds a whole lot like it could make things not be found, can you motivate why you have that? (to yourself, I have no clue)

If you get an error message, read it, look for clues, look for things to google

I’ve found the whole list of npm install commands here, I’ll destroy my existing machine and try again, let’s see what I can do with that.
–no-bin-links helped me to install react, so I’ve just wanted to install webpacks in the same way.

Helped how? Is that actually what you want or did you just do it to make the install succeed? Maybe it does something unwanted, and if so, what is causing the install to fail without it, maybe that’s the real issue?

Thank you, I’m now reading npm docs and trying, I’ll write immediately, if I succeed.

I imagine that there’s some error message that shows up when you install normally?

You’re gonna have to explain what that’s meant to tell me. Looks a whole lot like the last one and not much like the installation of anything.

Sorry, I got confused with two printscreens.
And here is my package.json, there are no dependencies, so I guess it could provide me with mistakes and warnings

But what happened when you tried to install in whatever way is the normal way?

That’s how it works with --no-bin-links

That’s still with that option. But since it looks like something that could cause things not to be found, the question is still, why did you add that option and what happens without it.

Here above are my errors when I try installing in normal way (I’ve edited the previous mistaken post)

“The --no-bin-links argument will prevent npm from creating symlinks for
any binaries the package might contain.” But I don’t get it for now, when I try to install this way, it returns me warnings, but no errors (fourth pic above). I don’t know why, that advice I’ve seen on github issues.

And if it’s looking for them, and does’t find them cause they weren’t created, then that’s one reason why it might not be finding that… whatever-it-is – unless you know exactly what’s going on and can say why that’s not the case.

Are you refering to this?

What you have there is a linux vm though, right? You’re using a linux file system where symlinks are nothing weird.
There’s some mention of sharing directories with windows preventing symlinks on VMWare vm’s… does that ring any bell?

Have you tried installing as root? It doesn’t say “permission denied”, but /usr/local/bin is owned by the root user on my system, and I do get permission denied if I run the same command.

1 Like

I haven’t tried installing as root, and the error “npm ERR! code: ‘EACCES’,” hints to me that I should try, but I don’t know how to do this.

Here’s kind of my problem

Add sudo before the command that you want to run with elevated privileges, or sudo su to change to root user with your password, or just su to change to root user with root’s password

But if that was the issue I really think you’d be seeing “permission denied” messages, I’d sooner put my money on that this has to do with windows

1 Like

Yeah, you’ve found where I saw about --no-bin-links flag

Is there a particular reason for using vagrant? You could use a “normal” vm. For picking a distro I suggest Antergos if you want the latest versions of everything, or Mint if… no clue why you wouldn’t just pick Antergos actually, better chance of installing in a vm perhaps.

1 Like

Thank you! I think it is a good idea)