Brand new installation issue per Tutorial fails
Answered
Sun bear posted this in #help-forum
Sun bearOP
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:
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!
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!
Answered by Sun bear
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 @American Crow 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.
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 @American Crow 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.
3 Replies
American Crow
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
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
Sun bearOP
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?
Sun bearOP
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 @American Crow 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.
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 @American Crow 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.
Answer