javascript icon indicating copy to clipboard operation
javascript copied to clipboard

$ npm run devserver is not working

Open ipyana opened this issue 5 years ago • 8 comments

Unfortunately am getting these errors when cloned the project and follow all the steps on setting environment for Node and its dependencies.

Screen Shot 2020-03-24 at 7 21 48 PM Screen Shot 2020-03-24 at 7 28 16 PM Screen Shot 2020-03-24 at 7 37 51 PM

ipyana avatar Mar 24 '20 17:03 ipyana

you have to kill port and then restart you can do this in command prompt or using same terminal first have to change directory to /c

saleh-dot avatar Sep 22 '20 17:09 saleh-dot

netstat -ano | findstr :3000 this will give you PID 4 digit number at end

saleh-dot avatar Sep 22 '20 17:09 saleh-dot

taskkill /PID "PID" /F "PID" will be from "netstat -ano | findstr :3000"

saleh-dot avatar Sep 22 '20 17:09 saleh-dot

I am also having similar problem, having cloned the repo, it doesn't display on web browser when I type in log as shown in the video tutorial

Savics407 avatar Oct 09 '20 11:10 Savics407

Same problem -

ERROR in ./~/css-loader!./~/sass-loader/lib/loader.js!./app/styles/main.scss
Module build failed: Error: Cannot find module 'node-sass'
Require stack:
- C:\Users\--\NELSON\javascript\node_modules\sass-loader\lib\loader.js
- C:\Users\--\NELSON\javascript\node_modules\loader-runner\lib\loadLoader.js
- C:\Users\--\NELSON\javascript\node_modules\loader-runner\lib\LoaderRunner.js
- C:\Users\-\NELSON\javascript\node_modules\webpack\lib\NormalModule.js
- C:\Users\-\NELSON\javascript\node_modules\webpack\lib\NormalModuleFactory.js
- C:\Users\-\NELSON\javascript\node_modules\webpack\lib\Compiler.js
- C:\Users\-\NELSON\javascript\node_modules\webpack\lib\webpack.js
- C:\Users\-\NELSON\javascript\node_modules\webpack-dev-server\lib\Server.js
- C:\Users\-\NELSON\javascript\node_modules\webpack-dev-server\bin\webpack-dev-server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\-\NELSON\javascript\node_modules\sass-loader\lib\loader.js:3:14)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at loadLoader (C:\Users\-\NELSON\javascript\node_modules\loader-runner\lib\loadLoader.js:18:17)
    at iteratePitchingLoaders (C:\Users\-\NELSON\javascript\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
    at iteratePitchingLoaders (C:\Users\-\NELSON\javascript\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at C:\Users\-\NELSON\javascript\node_modules\loader-runner\lib\LoaderRunner.js:176:18
    at loadLoader (C:\Users\-\NELSON\javascript\node_modules\loader-runner\lib\loadLoader.js:47:3)
 @ ./app/styles/main.scss 4:14-122
 @ ./app/js/index.js
 @ multi (webpack)-dev-server/client?http://localhost:3000 babel-polyfill ./app/js

mmaio79 avatar Feb 09 '21 14:02 mmaio79

For those having issues making this work, try this. First I downloaded Git and ran Git Bash. If you don't gitbash follow this tutorial https://www.youtube.com/watch?v=BMW7LiF_Oc4 I created a folder "code" on C:// With the Git Bash terminal I navigated (type in cd /c/code/ ) to the directory I wanted to install the data to. Then type in the following: git clone https://github.com/amigoscode/javascript.git cd javascript/ try running these in order:

npm install npm cache clean --force npm install -g npm npm install *optional (npm unistall ~/.node-gyp then npm update) npm run devserver

I hope this helps

reccollo avatar Feb 13 '21 06:02 reccollo

  1. Remove the node_modules complete folder and remove the package-lock.json file

  2. Clear npm cache by using command npm cache clean. you can force to clean if gives error

  3. Install and then rebuild node-sass

npm install node-sass@latest npm rebuild node-sass

  1. npm i

This worked for me

nabzdeezy1 avatar Mar 01 '21 19:03 nabzdeezy1

  1. Remove the node_modules complete folder and remove the package-lock.json file
  2. Clear npm cache by using command npm cache clean. you can force to clean if gives error
  3. Install and then rebuild node-sass

npm install node-sass@latest npm rebuild node-sass

  1. npm i

This worked for me

Didn't need to remove anything. Just do:

npm install node-sass@latest npm rebuild node-sass npm i

It worked for me

dvdgao34 avatar May 28 '21 12:05 dvdgao34