#Brand new installation issue per Tutorial fails

5 messages · Page 1 of 1 (latest)

long snow
#

Hello –
I have decent grasp of HTML, CSS and Javascript. I am looking to learn React and have decided to go with the Next framework.

My development server is a stock Ubuntu 20.04 virtual machine running on my x64 NAS.
I have installed nvm and node in my home folder on the Ubuntu VM. EDIT: I do this as non-root so it is not a global installation.
My development files are located on the NAS - I mount the development folder using SMB on the Ubuntu server.

I cd to the development folder and run the tutorial instructions provided at React Foundations – Chapter 9 (https://nextjs.org/learn/react-foundations/installation)
I run “npm install react@latest react-dom@latest next@latest”
This fails with the error: “npm ERR! ENOTSUP: operation not supported on socket, symlink”

I google to investigate and decide to run the commands as: “npm install –no-bin-links react@latest react-dom@latest next@latest”

This succeeds! Delighted! I now proceed with Chapter 9. Two questions:

  1. The tutorial says to create a folder called “app”: is this new folder in the same folder where I ran the “npm install command”?
  2. I created the “app” folder in the same folder where I ran “npm install command” and after making the changes as stated in the tutorial, I then proceeded to run “npm run dev”. This fails with the error:

dev
next dev

sh: 1: next: not found

I checked that the node_modules folder created when installing react and next contain the subfolders “next” and “@next”.

Please bear with me as I am new to node, react and next, so this question may be elementary. But how can I go about fixing this error?

Thank you!

Learn how to install Next.js and refactor your code.

pearl dustBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

glacial lodge
#

Its hard to answer, since someone would need the exact same setup as you do.
However, pretty sure this is a follow up error to the first error which says that your filesystem does not support symlinks.
If possible i'd suggest not to use a shared filesystem for now

long snow
#

Thanks for your response! I will continue looking into the links issue. BTW any thoughts on whether React, React-dom and Next should be installed at the same level as Node?

long snow
#

SOLUTION:
I was able to get it to work by doing the following:

  1. Installing React, React-dom and Next at the same level as Node
  2. Installing them without using the "--no-bin-links" flag

Hat tip and thanks to @glacial lodge for pointing me in the right direction!

EDIT: I ran into the issue again when spinning up a new project and discovered that I was not mounting my SMB share with symlinks enabled. With that change made I no longer get the "npm ERR! ENOTSUP: operation not supported on socket, symlink" error.