Error during live-server npm installation: symlink issue persists even with root/admin privileges

In my current project, I am following a tutorial on AngularJS from the book titled "Unraveling AngularJS 1.5 (With Over 130 Complete Samples" by István Novák, which stipulates the need for installation of Node.js. The appendix of this book provides command line instructions for installing various packages related to Node.js using NPM, with one of them being live-server. Following the given commands:

npm init -y
npm install angular@^1.5.0 --save
npm install angular-messages@^1.5.0 --save
npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0b6a656c7e676a792679647e7f6a2539">[email protected]</a> --save
npm install bootstrap --save
npm install jquery --save
npm install live-server --save-dev 

All the installations went smoothly except for the live-server package. Attempting to install it led to several error messages as shown in the npm-debug.log file:

335 warn <a href="/cdn-cgi/l/email-protection" class="__cf_email__"" data-cfemail="df8ab1adbea9bab3b6b1b89eb1b8aab3beadeef1ea9feef1eff1ef">[email protected]</a> No repository field.
336 verbose stack Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime'
336 verbose stack     at Error (native)
337 verbose cwd /media/usb/AngularJS Test/Samples
338 error Linux 4.4.0-31-generic
339 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "live-server" "--save-dev"
340 error node v4.4.7
341 error npm  v3.10.5
342 error path ../mime/cli.js
343 error code EPERM
344 error errno -1
345 error syscall symlink
346 error Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime'
346 error     at Error (native)
346 error  { [Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime']
346 error   errno: -1,
346 error   code: 'EPERM',
346 error   syscall: 'symlink',
346 error   path: '../mime/cli.js',
346 error   dest: '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime',
346 error   parent: 'UnravelingAngular1.5' }
347 error Please try running this command again as root/Administrator.
348 verbose exit [ -1, true ]

The last line advises trying the command as root/admin, however, even when attempting this on Ubuntu 16.04 LTS as the root user, the same issue persists with the symlink error. This problem seems to be specifically related to symlinks, an area that I am not familiar with. Interestingly, all other components installed via NPM were successful without any issues.

If anyone has encountered and resolved the symlink predicament mentioned above, could you please share your insights?

Answer №1

For resolution, it is advised to check for any errors such as the one indicated by code 347 and attempt running the command with elevated permissions as 'root' or 'Administrator'. Additionally, verifying the compatibility of the node module version is recommended. An alternative solution could be to uninstall and reinstall the lite-server package using the command npm install lite-server -g. It is possible to install lite-server independently.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Press the key to navigate to a different page

I have an input field for a search box. I want it so that when I enter my search query and press enter, the page navigates to another page with the value of the input included in the URL as a query string. How can I achieve this functionality? Thank you ...

Using Next Js for Google authentication with Strapi CMS

Recently, I've been working on implementing Google authentication in my Next.js and Strapi application. However, every time I attempt to do so, I encounter the following error: Error: This action with HTTP GET is not supported by NextAuth.js. The i ...

I encountered an issue with the onclick event in JavaScript

I have been struggling with an issue for some time now and I just can't seem to figure out what I am doing wrong. Here's the problem - when I click on a link on my website, a calculator should pop up. Then, when I click the off button on the calc ...

Transferring session data through AJAX in PHP

I'm currently developing an app using PhoneGap. However, PhoneGap only supports HTML, CSS, and JS, not PHP. This led me to the workaround of placing the PHP file on a remote server and using AJAX to call it via the server's URL. My issue now is ...

Pytest is not able to locate any elements on the webpage, yet the same elements can be easily found using the console

When using CSS or XPath in the console (F12), I am able to locate the element on the page. $$("span.menu-item[data-vars-category-name='Most Popular']") However, when trying to find the same elements with Selenium (pytest) using: driver.find_el ...

Modify the layout of the date selector to display weekdays instead - material ui

How can I change the datepicker format to display weekdays (Monday, Tuesday,..) instead of MM/dd/yyyy? Currently, the datepicker is set up with the format format="MM/dd/yyyy". Would it be possible to modify this? Here is the source code: <MuiPickers ...

Tips for continuing to write to the same CSV file without starting over

Currently, I am utilizing a nodejs package to write data to a CSV file every minute. The initial creation of the file and the first write operation work fine. However, when attempting to write to the same file again, I encounter an error in nodejs. Despite ...

Utilizing NextJS App in a Docker Container with Production Environment Variables

Everything runs smoothly when testing and using my NextJS Application with .env.local. However, the issue arises during a production build for deployment as it fails to locate the .env.production values, even though they are an exact replica of .env.local ...

Using a comma as a parameter separator is not valid

Having trouble setting up a WhatsApp button with a custom message, I wrote a JavaScript script and called it using onclick. I've tried adjusting quotation marks but nothing seems to be working. This issue might seem minor, but as a beginner in coding ...

Amplify build is encountering an issue due to a ReferenceError stating that the license variable is not

I encountered the original error Task never defined: default, which was discussed here: Build failed for AWS Amplify React Site for unknown reason However, I am now facing a new error: 2022-04-10T16:04:21.976Z [WARNING]: ReferenceError: license is not def ...

Create a variety of unique images without using the same one more than once

I'm currently developing my first Javascript game, but I've hit a roadblock.. I am trying to create a game that displays random images without repeating them. Each image should be accompanied by a random number between 4 and 10. The code I have w ...

Events in the backbone view fail to trigger after a re-render

For some reason, I am struggling to get mouse events to work on my backbone view after it is re-rendered. It seems like the only solution is to use a rather convoluted jQuery statement: $("a").die().unbind().live("mousedown",this.switchtabs); I initially ...

Enhance your data retrieval from XPATH using Javascript

Here is the layout of an HTML template I am working with: <div class="item"> <span class="light">Date</span> <a class="link" href="">2018</a> (4pop) </div> <div class="item"> <span class="light">From</sp ...

Material-UI - Switching thumb styles in a range slider

Looking for a way to style two entities differently on the Material-UI Slider? Entity A as a white circle and Entity B as a red circle? While using data-index can work, there's a flaw when sliding. Is there a better approach? if (data-index === 0) { ...

Removing double double quotes for Javascript

My problem involves a string that represents longitude/latitude in the format of dd°mm'ss''W (note 2 single quotes after ss). To convert this string into its decimal representation, I am using the following code snippet: function dmsTodeg ...

Express-Formidable error: Unable to establish headers once they have been transmitted

Using the express formidable module results in an error when the page is loaded twice, as shown on the console: GET /users 304 6.948 ms - - GET /users 304 213.344 ms - - Error: Can't set headers after they are sent. at validateHeader (_http_outgoing. ...

NodeJS CLI Application Experiencing Issues with User Input Interpretation

Trying to collect user input from the command line in order to build a basic command line interface application. Leveraging the standard_input.on() function to capture and process the user input to determine appropriate responses on the command line. Encou ...

Standardizing URLs with ExpressJS router

Seeking normalized/canonical URLs for a single page application running on an ExpressJS server. While the SPA is supported by a server-side router, templates can vary slightly for different app URLs. One particular difference is the presence of the <li ...

What is the best way to display text from a file on a different html page using jQuery's json2html?

Here is the json data: var data = [ { "name": "wiredep", "version": "4.0.0", "link": "https://github.com/taptapship/wiredep", "lice ...

Ensure that the central section of the slider remains illuminated

Looking for help with customizing my "product" slider, lightSlider. I want the middle div to always be highlighted when navigating through the slider. Here's what it looks like currently: Link to screenshot - current. My goal is to achieve this look: ...