Issue: My application is unable to start due to the module nuxt.js not being found. Can someone help me troubleshoot

Upon attempting to execute npm run dev following the installation of dependencies, I encountered an error that has left me puzzled. Despite trying various solutions found online, none have seemed to resolve the issue.

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8bfbe7fef8e3e4e7e2efeaf2f8a6eafbfbcbbaa5bba5bb">[email protected]</a> dev
> nuxt

"F\plusholidays-app\node_modules\.bin\" is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'C:\Users\anyel\Documents\src\nuxt\bin\nuxt.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Please see below the contents of package.json:

{
  "name": "plusholidays-app",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  ...
}

I am eager to gain a better understanding of this issue, but I'm currently unsure of where to focus my attention next. Any guidance or recommendations would be greatly appreciated.

Answer №1

Consider installing the nuxt-start package to address this issue.

I successfully resolved a comparable problem using this method (In a live production environment)

Answer №2

Can anyone tell me where my node_modules folder is located? It seems to be at

C:\Users\anyel\Documents\src\nuxt\bin\nuxt.js

I've tried setting the path as:

 script: './node_modules/nuxt/bin/nuxt.js',

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

Changing text on a button with JavaScript toggle functionality: A step-by-step guide

I am looking to implement a feature where I can hide and show overflow content in a div. When I click on the expand button, it expands the content. However, I want this button to toggle and change text as well. Thank you! function descriptionHeightMo ...

I'm having trouble getting my .click method to work with the <div id=menuButton>. Can anyone help me figure out why this is happening?

Here is the HTML code I created for a dropdown menu. Initially, in the CSS file, the menu is set to display: none; <!doctype html> <html> <head> <title>DropDown Menu</title> <link rel="stylesheet" href="normalize ...

Experimenting with an Angular Controller that invokes a service and receives a promise as a

I am currently in the process of testing an angular controller that relies on a service with a method that returns a promise. I have created a jasmine spy object to simulate the service and its promise-returning method. However, my mock promise is not retu ...

Tips on validating multiple forms with the same name in AngularJS

Hello, I am seeking a way to check the validity state of all forms outside of the form tags. For example, if any form is invalid, I want an error message to be displayed. The use of myform.$invalid doesn't seem to work for all forms or update properly ...

Automatically populate select boxes with values from a different source using PHP

I'm in the process of setting up automatic population for 2 select boxes on a website. When a user chooses a class, the second select box automatically displays the main specialization of that class. If the user selects Tank (for example), the third ...

Is it necessary to clean and reinstall node_modules every time I deploy in a production environment?

We manage over 10 production servers and each time we update our dependencies, performing a clean installation seems more controlled but also slower. The issue is that the devops team is concerned about the time it takes to perform a clean npm install aft ...

Cancel a batch upload request using AJAX

Currently, I am working on implementing a feature for aborting a multiple file upload process while also displaying the progress of the upload with a progress bar. My objective is to ensure that when the user clicks on the abort button, not only does the ...

Hidden Document Scroll Offset

When CSS is used to hide scrollbar html, body { width: 100%; overflow-x: hidden } The above code snippet removes the scroll from the window but triggers it on the body element. To calculate the scroll values in such cases, you can use: pageOffset = ...

Using AXIOS and VueJs to visually represent data with a two-dimensional array

I'm new to vuejs and I want to display my data response in a two-dimensional table. This is the data I have: [{ "origine": "", "nb": 15 }, { "origine": "?", "nb": 18 }, { "origine": "?L", "nb": 1 }, { "origine": "G", "nb": 298 }, { ...

a solution to the focus/blur issue in Firefox's browser bug

I have created the following script to validate if a value entered in an input field already exists in the database. $('#nome_field').blur(function(){ var field_name=$('#nome_field').val(); $.ajax({ url: " ...

Definitions for TypeScript related to the restivus.d.ts file

If you're looking for the TypeScript definition I mentioned, you can find it here. I've been working with a Meteor package called restivus. When using it, you simply instantiate the constructor like this: var Api = new Restivus({ useDefaultA ...

The method defined in user.model.js cannot be utilized in mongoose and node

When developing an app with node and mongoose, I encountered a peculiar issue while testing. Below is my auth.index.js file for user login. auth.index.js: var express = require('express'); var mongoose = require('mongoose'); var passp ...

What is the process for creating a line using points in three.js?

Can anyone provide a solution for creating a straight line using new THREE.Points()? I attempted to place particles and set their positions with an array and for loop, but the spacing was inconsistent. ...

Controlled Material-UI v5 DateTimePicker triggers input focus upon closure

Is there a way to have 2 DateTimePicker components as siblings, and when I click on the second one while the first one is still open, it should open a new DateTimePicker with focus on it? Can someone help me achieve this? Link to code example I want the ...

What is the best way to enable object references in Node modules?

I've been working on my Express.js web app and I've realized that as I extract parts of my code from the main app.js file into separate modules, I sometimes need to access objects from the main file. I'm trying to figure out the best way to ...

Date Range Selection Widget malfunctioning when used within a popup modal

Having trouble with integrating the rsuite daterangepicker and antd's daterangepicker into a React Material UI Dialog/Modal. The date picker popup seems to either not show up or appear outside of the modal window. Take a look at the image below: Clic ...

What is the best way to add a dynamic URL in <router-link> using VueJS?

I am currently utilizing the v-for directive to retrieve URL names. However, I am encountering difficulties in properly passing the value obtained from an instance of v-for as the URL name. <template> <v-list-tile class="pl-5" v-for="choice i ...

Implementing Vue 2.0 server-side rendering with a template embedded within the #app container

Looking to implement server-side rendering? Check out this resource: ssr.html However, what if we want to specify the template directly inside the <div id="app"></div> in the HTML file itself, rather than in the Vue instance template ...

Postal Code Auto-Suggest by Google

I'm attempting to create a unique autocomplete feature for a text box that specifically provides postal codes. To accomplish this, I have followed the guidelines outlined in the documentation found at https://developers.google.com/places/webservice/au ...

Cypress eliminating the "X-CSRFToken" header

There seems to be an issue with the Cypress test runner where it is removing X-CSRFToken from the request header, leading to a 403 Forbidden error. I have compared the headers between a manual run and a Cypress test run, and you can see the difference in t ...