Installing material-design-lite with NPM - node.js

I'm working on a MEAN stack (Mongo, Express, Angular, Node) and would like to use Google's Material Design Lite library. According to the docs one should run
npm install material-design-lite --save
Inside an NPM project to enable use of the mdl components. I get following error:
npm ERR! Failed at the material-design-lite#1.0.0 install script 'napa mojombo/clippy'.
npm ERR! This is most likely a problem with the material-design-lite package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! napa mojombo/clippy`
So there's a problem with napa mojombo/clippy anyone have an idea how to fix this?

try to find the root cause with verbose
npm install material-design-lite --save --verbose

npm install material-design-lite#1.0.0-3
this should work, issue here

Related

Installing dependencies with npm-peer-dependencies

I am trying to install the required node_modules for a small project running Angular 11 using npm install
My goal is get the project to work locally after downloading it from GitHub. I have already installed the latest version of the Angular CLI.
After running the install command I tried npm start.
I was expecting that after running the install and start command to be able to run the project locally.
However the actual result I get after running the install command is the following list of errors:
> ng serve
An unhandled exception occurred: Cannot find module '#angular/compiler'
Require stack:
\node_modules\#angular\compiler-cli\index.js
\node_modules\#ngtools\webpack\src\angular_compiler_plugin.js
\node_modules\#ngtools\webpack\src\index.js
\node_modules\#angular-devkit\build-angular\src\webpack\configs\typescript.js
\node_modules\#angular-devkit\build-angular\src\webpack\configs\index.js
\node_modules\#angular-devkit\build-angular\src\browser\index.js
\node_modules\#angular-devkit\build-angular\src\dev-server\index.js
\node_modules\#angular-devkit\architect\node\node-modules-architect-host.js
\node_modules\#angular-devkit\architect\node\index.js
\node_modules\#angular\cli\models\architect-command.js
\node_modules\#angular\cli\commands\serve-impl.js
\node_modules\#angular-devkit\schematics\tools\export-ref.js
\node_modules\#angular-devkit\schematics\tools\index.js
\node_modules\#angular\cli\utilities\json-schema.js
\node_modules\#angular\cli\models\command-runner.js
\node_modules\#angular\cli\lib\cli\index.js
\node_modules\#angular\cli\lib\init.js
\node_modules\#angular\cli\bin\ng
See "angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\WINDOWS\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the #0.0.16 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:
The problem is that this Angular project also has peer dependencies. I installed npm-install-peers package but it seems that simply running npm install afterwards will not install the required peer dependencies.
What should I do next to get this Angular project installed locally ?
The issue you are facing is likely because angular cli or npm-peer-dependencies are not installed globally on your machine.
The steps that you should take are to make sure of them are globally installed.
To install packages globally you need run npm install -g <package_name>
npm docs link
In your case for angular cli you should run
npm i -g #angular/cli#11.2.15 and npm install -g npm-peer-dependencies.
Then run npm start.

npm ERR! install electron-packager

I am creating a new electron app and now I need to install electron-packager in it.
node -v v10.16.0 & npm -v v6.9.0
(I updated both)
I have tried to run this:
npm install electron-packager --save-dev
and this:
npm install electron-packager -g
The Error:
npm ERR! code E404
npm ERR! 404 Not Found - GET http://registry.npmjs.org/electron-packager
npm ERR! 404
npm ERR! 404 'electron-packager#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
What can I do?
Thanks!
It would be better if you specified the OS.
I once faced this problem and downgrading node to v8.0 fixed this problem.
But I would strongly recommend you to use electron-builder(https://github.com/electron-userland/electron-builder) instead of electron-packager for creating installer packages, as it is a lot easier with lot more options including built-in auto-update feature.

Cannot Install Any Package NPM Node-JS

The problem I face is when I will install one of the packages NPM is always show
[............] /roolbackFailedOptional: verb npm-session ....
and the final show error like :
npm ERR! code e503
npm ERR! 503 Service Unavailable:
npm ERR! A complete log of this run can be found in:
npm ERR! C:Users\.......\AppData\Roaming\npm-cache\_logs\2018-08-08t08_09_25_773Z-debug.log
I have already found a solution from here. But it didn't worked.
The configuration NodeJS in my system :
and i use version for
NodeJS : 10.8.0
npm : 6.2.3
Please help me for fixed my problem...
not sure if it will fix your issue but i used
npm install --proxy proxy_address:port install package_name --save
when i had troubles with proxy, if this works, then you might have configured npm settings not the way you need to.

npm install error web project

When I try install npm modules I see the following problem:
PS C:\Users\maxzag\Desktop\svoi> npm install
npm ERR! Cannot read property '0' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\maxzag\AppData\Roaming\npm-cache\_logs\2017-08-15T11_25_41_473Z-debug.log
Can someone already come across this problem and can something advise?
This might be your issue: https://github.com/npm/npm/issues/17858
Try removing node_modules and running npm install again.

Can't run npm install in an Ember CLI application?

I am setting up an Ember application on a new laptop. I installed node, npm through brew and I also have the Ember CLI. Within the Ember CLI app, I'm trying to do an npm install but when I do, I get this error in the terminal:
npm WARN package.json npm#1.4.21 Non-dependency in bundleDependencies: inherits
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.33
npm ERR! npm v2.1.11
npm ERR! code E404
npm ERR! 404 Not Found: expresss
npm ERR! 404
npm ERR! 404 'expresss' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'ember-cli'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Nagarjun/Code/sumo-list/web-client/npm-debug.log
I can't run my projects until this is resolved. What am I missing? I even Googled but couldn't find anything for expresss.
My guess is 'expresss' (with an extra s) is a package on npm that was pulled. The dependency was in fact listed in the package.json file for ember-cli but I don't think anyone ever noticed it until later versions.
Proof: https://github.com/stefanpenner/ember-cli/blob/ec8a6ab898599746bddbb8f72f7633c29f0ee95b/package.json#L58
I was able to resolve this issue by uninstalling node and npm completely using brew. Then, installing node.js using the package from nodejs.org. Now, my npm version is 1.4.28. Looks like the issue was caused by the newer npm 2.1.10. Not sure why brew automatically picks up the new npm.
Look in your package.json dependencies section. Looks like a typo.
I faced the same issue but it got fixed by running sudo npm install -g ember-cli

Resources