Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing npm install never finishes #31

Closed
markzolotoy opened this issue Mar 22, 2018 · 14 comments
Closed

Executing npm install never finishes #31

markzolotoy opened this issue Mar 22, 2018 · 14 comments

Comments

@markzolotoy
Copy link

markzolotoy commented Mar 22, 2018

After cloning the project I am running npm install. Here is what I get
PS K:\Project1> npm install
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\new.md'
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\asyncworker.md'
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\callback.md'
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\converters.md'
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\errors.md'
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\json.md'
npm WARN tar ENOENT: no such file or directory, open 'K:\Project1\node_modules.staging\nan-1c7803b7\doc\maybe_types.md'
npm WARN [email protected] No repository field.

npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'angular-pwa-seed'
npm ERR! notarget

And the command is not finishing.

Actually it did finish. Should I be concerned with errors?

I guess, I should be because next command did not work at all:

PS K:\Project1> npm run start

[email protected] start K:\Project1
npm run ng -- serve --port 5555 --aot

[email protected] ng K:\Project1
ng "serve" "--port" "5555" "--aot"

'ng' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ng: ng "serve" "--port" "5555" "--aot"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ng 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\Mark\AppData\Roaming\npm-cache_logs\2018-03-22T09_10_42_892Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: npm run ng -- serve --port 5555 --aot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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\Mark\AppData\Roaming\npm-cache_logs\2018-03-22T09_10_42_923Z-debug.log

Can you please help?

Thanks

@thomascayne
Copy link

I had the same experience yesterday. Didn't finish. Aborted. Retry didn't work. Aborted.

@jvitor83
Copy link
Owner

What are your node and npm versions?

@markzolotoy
Copy link
Author

Node - v 8.9.4
npm- 5.6.0

@jvitor83
Copy link
Owner

Guys, i am really sorry, but i wan't able to reproduce your problem.
I even reinstall node and do a git clone, but it worked just fine.

Can you please try to clear the cache, or even reinstall node and try again?

@markzolotoy
Copy link
Author

Which cache to clear?

@jvitor83
Copy link
Owner

@markzolotoy
Copy link
Author

Did not help.

@rodolfocop
Copy link

Hi, try this please.

rm -rf package-lock.json 
rm -rf node_modules
npm cache clean --force
npm install

@markzolotoy
Copy link
Author

PS K:\Project1> rm -rf package-lock.json
Remove-Item : A parameter cannot be found that matches parameter name 'rf'.
At line:1 char:4

  • rm -rf package-lock.json
+ CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

@jvitor83
Copy link
Owner

1 - DELETE the file package-lock.json
2 - DELETE the directory node_modules
3 - RUN npm cache clean --force
4 - RUN npm install

@thomascayne
Copy link

I'm marking this as resolved (on my part). @markzolotoy , maybe you can try this: I deleted my node_modules folder; followed the installation steps using npm and it still hangs, again.

After it failed, this time I ran yarn [install]. Other than warnings for peer dependencies all packages were installed.

npm run start and ng serve now works.

@jvitor83 great job on this project. Beautifully done. Thank you!

@jvitor83
Copy link
Owner

My guess is that the package-lock.json is causing the trouble.
I think the 4 steps i put solve the problem.
@markzolotoy, open it again if not works for you.

@markzolotoy
Copy link
Author

markzolotoy commented Mar 23, 2018

Yes, these four steps helped. Thank you! For the future reference what exactly it was? I do get a few warnings:
WARNING in ./node_modules/ionic-angular/util/ng-module-loader.js
27:11-36 Critical dependency: the request of a dependency is an expression

WARNING in ./node_modules/ionic-angular/util/ng-module-loader.js
37:11-36 Critical dependency: the request of a dependency is an expression

Is it critical?

@rodolfocop
Copy link

@markzolotoy this not problem, you can see here explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants