DEV Community

Jason Harrel
Jason Harrel

Posted on

NPM Start Problems

Lately there's been a lot of weird things going on when I go to create a new React App using create-react-app . This is either done through npm start not activating, yarn not being initiated with Yarn Start or whatever else the problems list may give me.

I would do everything the terminal said like "delete package-lock.json" "delete NPM folder" and whatever else might be going on.

One solution I found for this is inside your NPM folder in your main computer directory is to delete the webpack folder. It's not the most ideal solution, but it seems to work for me. Until today.

Today was a whole whirlwind of issues. Not only did those issues continue to come up, but deleting my webpacks folder as I mentioned from NPM didn't help either. Now as far as I know, deleting NPM extensions from the root of your computer isn't going to hurt anything as it'll be rewritten when you run yarn or npm i or npm install. Good thing huh?

Anyways something I learned to fix this problem was to give the computer a good ol' restart. Shocker huh? Then follow along the steps it gives you again and it should work.

Another work around can be to run yarn install then yarn update. That can give your project a new life. I'm not sure why this is a solution as it should update at times for you, but giving it a kick in the butt seems to help too.

Top comments (19)

Collapse
 
gouthamigou profile image
Gouthami-gou

Sir,I 'm stuck at npx create-react-app please will you give me solution

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Can you please specify what exactly your problem is? Any error messages?
Then I am sure someone can help you :)

Collapse
 
gouthamigou profile image
Gouthami-gou

core-js@2.6.11 postinstall D:\sample\node_modules\babel-runtime\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

core-js@3.6.4 postinstall D:\sample\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

core-js-pure@3.6.4 postinstall D:\sample\node_modules\core-js-pure
node -e "try{require('./postinstall')}catch(e){}"

[?25l[[7m [27m[90m......[0m] - postinstall:p-limit: [32minfo[0m [35mlifecycle[0m p-limit@1.3.0~posti[[7m [27m[90m......[0m] | postinstall:ansi-regex: [32minfo[0m [35mlifecycle[0m ansi-regex@2.1.1~posti[[7m [27m[90m......[0m] | postinstall:extend-shallow: [32minfo[0m [35mlifecycle[0m extend-shallow@2.0[[7m [27m[90m......[0m] | postinstall:has-value: [32minfo[0m [35mlifecycle[0m has-value@1.0.0~postins[[7m [27m[90m......[0m] | postinstall:asn1.js: [32minfo[0m [35mlifecycle[0m asn1.js@4.10.1~postinstal[[7m [27m[90m......[0m] | postinstall:os-browserify: [32minfo[0m [35mlifecycle[0m os-browserify@0.3.0[[7m [27m[90m......[0m] - postinstall:cssesc: [32minfo[0m [35mlifecycle[0m cssesc@2.0.0~postinstall: [[7m [27m[90m......[0m] | postinstall:regexpp: [32minfo[0m [35mlifecycle[0m regexpp@3.0.0~postinstall[[7m [27m[90m......[0m] | postinstall:string_decoder: [32minfo[0m [35mlifecycle[0m string_decoder@1.1[[7m [27m[90m......[0m] | postinstall:simple-swizzle: [32minfo[0m [35mlifecycle[0m simple-swizzle@0.2[[7m [27m[90m......[0m] - postinstall:@babel/highlight: [32minfo[0m [35mlifecycle[0m @babel/highlight[[7m [27m[90m......[0m] | postinstall:@babel/generator: [32minfo[0m [35mlifecycle[0m @babel/generator[[7m [27m[90m......[0m] - postinstall:send: [32minfo[0m [35mlifecycle[0m send@0.17.1~postinstall: sen[[7m [27m[90m......[0m] - postinstall:typedarray: [32minfo[0m [35mlifecycle[0m typedarray@0.0.6~posti[[7m [27m[90m......[0m] | postinstall:postcss-color-gray: [32minfo[0m [35mlifecycle[0m postcss-color-[[7m [27m[90m......[0m] - postinstall:schema-utils: [32minfo[0m [35mlifecycle[0m schema-utils@2.6.5~p[[7m [27m[90m......[0m] | postinstall:utila: [32minfo[0m [35mlifecycle[0m utila@0.4.0~postinstall: ut[[7m [27m[90m......[0m] | postinstall:cliui: [32minfo[0m [35mlifecycle[0m cliui@4.1.0~postinstall: cl[[7m [27m[90m......[0m] - postinstall:string-width: [32minfo[0m [35mlifecycle[0m string-width@3.1.0~p[[7m [27m[90m......[0m] - postinstall:pump: [32minfo[0m [35mlifecycle[0m pump@2.0.1~postinstall: pump[[7m [27m[90m......[0m] - postinstall:yaml: [32minfo[0m [35mlifecycle[0m yaml@1.8.3~postinstall: yaml[[7m [27m[90m......[0m] - postinstall:postcss-loader: [32minfo[0m [35mlifecycle[0m postcss-loader@3.0[[7m [27m[90m......[0m] / postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] / postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] / postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] / postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] \ postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] \ postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] / postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] - postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] - postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] - postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [[7m [27m[90m......[0m] - postinstall: [32minfo[0m [35mlifecycle[0m react-scripts@3.4.1~postinstall: [K[?25h+ cra-template@1.0.3

55 packages are looking for funding
run npm fund for details

found [92m0[0m vulnerabilities

[K[?25h7m

am getting this type of error when i create a new react app

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

I can't see an error withing this log but some lines inbetween are cut off by "...".
Could you please format it with three backticks at the beginning and again at the end so it's well formatted?

code...
Thread Thread
 
gouthamigou profile image
Gouthami-gou

after that type of error only nodemodules,package-lock,package.json files are only created it is not creating the entire structure like src,public ..sir, please will you provide me the solution and how to solve it.

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

Can you please provide the error message?

Thread Thread
 
gouthamigou profile image
Gouthami-gou

core-js@2.6.11 postinstall D:\app2\node_modules\babel-runtime\node_modules\core-js

node -e "try{require('./postinstall')}catch(e){}"

core-js@3.6.4 postinstall D:\app2\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

core-js-pure@3.6.4 postinstall D:\app2\node_modules\core-js-pure
node -e "try{require('./postinstall')}catch(e){}"

this was my error

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

I'm afraid but there is no error message. This is only the call stack.

Thread Thread
 
maitryshah67 profile image
Maitry shah

I am also getting the same messages , I know there are no errors but the code is getting stuck at the line of npm audit fix .
It doesn't show anything after that

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

Which OS are you using? When on an Unix system, try to use sudo.
Otherwise try to delete your npm cache and try again.

Thread Thread
 
maitryshah67 profile image
Maitry shah

I'm using windows 10

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

Same command, try npm cache clean and run your commands afterwards.

Thread Thread
 
maitryshah67 profile image
Maitry shah

Thanks for the suggestions but actually when i downloaded nodejs with 32 bits. It worked so thanks for ur time

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

Good you solved it ๐Ÿ˜Š

Thread Thread
 
maitryshah67 profile image
Maitry shah

Thank you so much

Thread Thread
 
kraman27 profile image
Aman Kumar

Hi, I'm facing the same problem, that it got stopped after npm audit fix. You did install nodejs for 32bit, but my system is 64 bit, what should I do ? Can you help me to figure it out.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

I discovered pnpm for myself just recently and must say I'm very pleased with it and have no such problems since I switched to pnpm.

GitHub logo pnpm / pnpm

๐Ÿ“ฆ๐Ÿš€ Fast, disk space efficient package manager

pnpm

Fast, disk space efficient package manager

npm version Status Coverage Status Join the chat at https://gitter.im/pnpm/pnpm OpenCollective OpenCollective Twitter Follow

Features:

  • Fast. As fast as npm and Yarn.
  • Efficient. One version of a package is saved only ever once on a disk.
  • Great for monorepos.
  • Strict. A package can access only dependencies that are specified in its package.json.
  • Deterministic. Has a lockfile called pnpm-lock.yaml.
  • Works everywhere. Works on Windows, Linux and OS X.

Like this project? Let people know with a tweet.

Table of Contents

Background

pnpm uses hard links and symlinks to save one version of a module only ever once on a disk When using npm or Yarn for example, if you have 100 projects using the same version of lodash, you will have 100 copies of lodash on disk. With pnpm, lodash will be saved in a single place on the disk and a hard link will put it intoโ€ฆ

Collapse
 
mzt7 profile image
MZT7

I am stuck at npm start

Collapse
 
sjellen profile image
SJellen

Iโ€™m having kinda the same problem with electron. And this is the first time Iโ€™ve used electron. So... so far so bad.