Unable to locate the specified path. internal/modules/cjs/loader.js encounters an error at line 834

I've been working on a project using Vue.js CLI, and when I enter 'npm run serve' in the terminal, it should provide me with a localhost link to paste in a browser to view my work. However, I keep encountering multiple errors:

> [email protected] E:\MILAD\VUE.JS\TRAINING & projects\log in CLI
> vue-cli-service serve

The system cannot find the path specified.
internal/modules/cjs/loader.js:834
 throw err;
 ^

Error: Cannot find module 'E:\MILAD\VUE.JS\@vue\cli-service\bin\vue-cli-service.js'
   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
   at Function.Module._load (internal/modules/cjs/loader.js:687:27)
   at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
   at internal/main/run_main_module.js:17:47 {
 code: 'MODULE_NOT_FOUND',
 requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Bannourah Gang\AppData\Roaming\npm-cache\_logs\2020-10-15T00_03_44_083Z-debug.log

Additionally, there is an unknown message stating: "This is probably not a problem with npm. There is likely additional logging output above."

I am uncertain about what this means and why it keeps appearing. Any assistance would be greatly appreciated.

Answer №1

The issue arises from the inability to locate the .js file within the directory. I encountered the same problem and successfully resolved it by following these steps:

  1. First, download Notepad++
  2. Next, open Notepad++ -> navigate to file -> select new -> input your code -> save with a ".js" extension (ensure that the "save as Type" is set as JavaScript file)
  3. Then, open cmd -> type node "fileName.js"

View Screenshot for reference

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

Validation based on the condition of the request body in Express using express-validator

I have a specific route in place for handling different scenarios, with only minor variations in logic between them. To keep things streamlined, I have decided to utilize a single endpoint and differentiate between cases using the parameter 'type&apos ...

Reducing HTML content to 20 words efficiently through the use of JS and VueJS

Currently in the process of developing a news feed using VueJS and have encountered an issue with rendering the content. Unfortunately, the API I am working with does not allow for easy customization to fit my specific needs. This API provides all the cont ...

Can arrays be utilized as keys for Objects in JavaScript?

I am looking to create a dictionary in Javascript that can return the same result with different keys. Here is an example of what I have tried: var dictionary = { [CHW,CW] : { //CHW and CW refer to the same thing [F ...

Facebook's Thumbs Down to My Code

I've been struggling to integrate a Facebook Like button on my blog using the following code: $("#fblike").append(" <iframe src='http://www.facebook.com/plugins/like.php?app_id=217624258276389&amp;" + window.location.href + "&amp;send ...

Is there an npm module available that can automate a daily task at a specified time in a Node.js environment?

Searching for an NPM Module to integrate into a Node.js application that can send notifications via email and SMS daily at 9am local time. Any suggestions or solutions would be greatly appreciated! ...

Node JS HTTP proxy stalling out

Seeking assistance with an http-proxy setup that proxies any website and injects a custom JS file before serving the HTML back to the client. Experiencing issues where accessing the proxied website results in a hang-up or indefinite loading in the browser. ...

Avoiding the stretching of images in a bootstrap carousel is a top priority

I'm facing an issue with my Bootstrap 4 carousel that takes up a large portion of the page. The images are loaded through an ajax request once received. Since all the photos are taken on a phone, they are either in landscape or portrait style. The p ...

NPM and Bower battle it out against Browserify, Gulp, Grunt, and Webpack in the world of web development tools

Attempting to sum up my understanding of the most commonly used JavaScript package managers, bundlers, and task runners. Please correct me if I'm mistaken: npm & bower act as package managers, simply downloading dependencies and calling on tools ...

I need to obtain the URL pathname on a server component in Next.js version 13 - how is this achieved

I'm facing an issue with retrieving the pathname of a server component located in the app directory. Despite attempting to obtain it through window.location, I haven't been successful. Is there an alternative method I can use to achieve this? ...

Restrict the number of GET requests made using D3.js and the Twitter API

Currently, I have made adjustments to my D3.js chart by switching from mouseover/mouseout events to mousemove. While this change has caused several issues in the chart, the most significant one pertains to my GET statuses/show/:id requests. In the past, h ...

The D3 path is generating an unexpected output of 0px by 0px, causing the map not to display properly. I am currently unsure how to adjust the projection to

I am currently working on creating a world map using D3. I obtained the JSON file from the following link: https://raw.githubusercontent.com/johan/world.geo.json/master/countries.geo.json Below is the code snippet I'm using: // Defining SVG dimensio ...

Splitting the div into two columns

I've encountered various solutions to this issue, but when I integrate an Angular2 component inside the divs, it fails to function properly. Here is my progress so far: https://i.stack.imgur.com/qJ8a9.jpg Code: <div id="container"> <div ...

Issue with Promise rejection not being caught in Node.js with ExpressNode.js and Express are not

Within my Express web application, I've created a function that outputs a Promise object. login: function(un, pass) { result = {}; var loginOk = new Promise( function (resolve, reject) { if (result.hasOwnPr ...

Is there a way to showcase a preview of an image within a modal window?

My component is structured like this : <input type="file" ref="file" @change="onFileChange" class="d-none" :accept="accept"> <button type="button" @click="selectFile" ...

How can I customize the font size of a label within a React Material UI Stepper?

Is it possible to modify the font size of stepper labels in React Material UI? If so, how can I accomplish this? function getSteps() { return [ "OPTION 1", "OPTION 2", "OPTION 3" "OPTION 4& ...

Guide to incorporating Bootstrap and its dependencies into a Chrome extension powered by Vue using npm

As I delve into the world of webpack, vue, and vuex to create a chrome extension, I encountered an issue with loading Bootstrap 4 within the extension. Despite using the correct path for the node modules folder, I keep getting a file not found error when t ...

Spin Three.js camera around central point with mouse control

I am attempting to achieve camera rotation around the central point (0, 0, 0) using mouse controls. However, when rotating 180deg to the right or left, and then attempting to rotate vertically, the vertical rotation does not occur at all. My approach inv ...

Error occurs when attempting to filter data through input text pasting in Angular

Currently, I am working on a web application that utilizes the Angular framework and angularfire2. The issue I am encountering is related to the data filter functionality not functioning correctly when pasting copied text. Interestingly, it works perfectly ...

How can I retrieve one distinct document for each group based on a shared property value in MongoDB?

I have a database collection set up in MongoDB with a schema like this: var personSchema = new mongoose.Schema({ _id: ObjectId, name: String, // ... alias: String }; (I am using mongoose, but the details are not important). Because I retrieve pe ...

Differences between POST and GET in relation to submitting a form to an action page and retrieving the results

I am currently exploring a new website and came across a form with an action that redirects to a different page upon submission. Upon submitting the form using the post method on the website itself, it successfully sends the data and loads information fro ...