recentpopularlog in

kme : npm   57

SPDX License List | Software Package Data Exchange (SPDX)
These are the identifiers recognized in NPM's 'package.json' files.
npm  package.json  opensource  license  licensing  packaging  reference 
9 weeks ago by kme
Creating a package.json file | npm Documentation
<code class="language-json">{
"name": "my-awesome-package",
"version": "1.0.0"

<code class="language-bash">npm init</code>
webdevel  javascript  npm  packaging  dammitbrain  solution 
9 weeks ago by kme
GitHub - nemanjan00/uniread: Uniread is Spritz like CLI fast reading software.
Uniread is Spritz like CLI fast reading software. - nemanjan00/uniread
ebook  speadreading  reader  app  npm  javascript  cli  commandline 
june 2019 by kme
GitHub - btford/write-good: Naive linter for English prose
Naive linter for English prose. Contribute to btford/write-good development by creating an account on GitHub.
english  language  grammar  writing  linter  stylechecker  nodejs  npm 
june 2019 by kme
The npm Blog — Building a simple command line tool with npm
Make the command available

In order to test that your command is being picked up, use npm link to have the system perform some symlinking operations. This should make the command available for you to run by typing github-pages-commit on the command line.
npm  commandline  javascript  cli  tutorial  howto  webdevel  devel  solution 
december 2017 by kme
package.json | npm Documentation |
Bare minimum valid 'package.json':

<code class="language-javascript">
"url" : "",
"email" : ""
npm  package.json  packaging  webdevel  dammitbrain  reference 
november 2017 by kme
This works, but be advised that its output is supposed to be the value part of the 'entries' key (itself a set of key-value pairs).

The recommendation from (use glob.sync()) works fine for what I needed it for.
webdevel  webpack  npm  maybesolution 
september 2017 by kme
How do I add comments to package.json for npm install? - Stack Overflow

This has recently been discussed in the node.js mailing list.

According to Isaac Schlueter who created npm:

... the "//" key will never be used by npm for any purpose, and is reserved for comments ... If you want to use a multiple line comment, you can use either an array, or multiple "//" keys.

{ "//": "this is the first line of a comment",
"//": "this is the second line of the comment" }

{ "//": [
"first line",
"second line" ] }
npm  package.json  configfile  webdevel  packagemanagement  commentcharacter  solution 
september 2017 by kme
npm command to uninstall unused packages in Node.js - Stack Overflow

Run npm prune to unbuild modules not listed in package.json.

From npm help prune:

This command removes "extraneous" packages. If a package name is provided, then only packages matching one of the supplied names are removed.

Extraneous packages are packages that are not listed on the parent package's dependencies list.

If the --production flag is specified, this command will remove the packages specified in your devDependencies.

npm  nodejs  packagemanagement  solution 
september 2017 by kme
Cannot find module 'shelljs' after installing shelljs with npm · Issue #109 · shelljs/shelljs · GitHub
The problem was that for some reason the NODE_PATH env var was not se on Mavericks.

Try: ~/.local/lib/node_modules/lib/node_modules
nodejs  npm  errormessage  javascript  webdevel  mac  osx  maybesolution 
september 2017 by kme
nodejs setup on Dreamhost VPS
git clone
1) Make a download dir to store the node source and download it.

mkdir downloads
cd downloads
git clone
Find the latest version

2) List all of the tags in the repository, and check out the most recent.
git tag
git checkout v0.12

At node v0.12.8-pre, 'npm' v2.13.4 was already present in 'node_modules'; no need to install it separately.
dreamhost  npm  nodejs  sharedhosting  howto  fromsource  solution 
august 2017 by kme
node.js - npm can't find package.json - Stack Overflow
The error message I got was "npm WARN enoent ENOENT: no such file or directory, open '/usr/bin/package.json'" using the SCL 'rh-nodejs4' package. Using the '-g' (global) option worked.
I'll be brief but deadly. :) install -d will not work for you. It's simple. Try

$ npm install -g express
nodejs  npm  errormessage  centos  centos6  solution 
august 2017 by kme
node.js - Install NPM into home directory with distribution nodejs package (Ubuntu) - Stack Overflow
Easier still: add prefix=$HOME/.local/lib/node_modules to your ~/.npmrc and then add that path + '/bin' to your PATH.

<code class="language-bash">
npm config set prefix $HOME/.local/lib/node_modules
echo "PATH=$HOME/.local/lib/node_modules/bin:$PATH" >> ~/.bashrc
nodejs  npm  configfile  dotfile  annoyance  solution 
march 2017 by kme
How to Install Node.js as a Non-Root User
Better solution is:
Create the ~/.npmrc file:

vim ~/.npmrc

Set the contents of the ~/.npmrc file to the following:

root = /home/nodejs/.local/lib/node_modules
binroot = /home/nodejs/.local/bin
manroot = /home/nodejs/.local/share/man
npm  nodejs  nonroot  sysadmin  maybesolution 
march 2017 by kme
How to yum install Node.JS on Amazon Linux - Stack Overflow []
Stumbled onto this, was strangely hard to find again later. Putting here for posterity:

sudo yum install nodejs npm --enablerepo=epel
ec2  fedora  centos  nodejs  npm  amazonami  solution 
march 2017 by kme
03 - Fixing npm permissions | npm Documentation
I picked ~/opt/npm-global, then added $/opt/npm-global/bin to my $PATH.
npm config set prefix '~/opt/npm-global'
javascript  devel  npm  permissions  annoyance  solution  mac  osx 
april 2016 by kme
node.js - Command to remove all npm modules globally? - Stack Overflow
npm ls -gp --depth=0 | awk -F/node_modules/ '{print $2}' | grep -vE '^(npm|)$' | xargs -r npm -g rm
webdevel  devel  javascript  npm  packagemangement  mac  osx  solution 
april 2016 by kme
node.js - how to uninstall npm modules in node js? - Stack Overflow
try this npm -g ls | grep -v 'npm@' | awk '/@/ {print $2}' | awk -F@ '{print $1}' | xargs npm -g rm to uninstall all gobally installed module. if you are on windows then you need to install Cygwin or git to run it – nmrony Jul 31 '13 at 5:59
javascript  npm  packagemanagement  mac  osx  maybesolution 
april 2016 by kme
Micropackages and Open Source Trust Scaling | Armin Ronacher's Thoughts and Writings
I think this pretty much nails the non-specific sense of dread that I have with using 'npm install <anything>'.
Any pin for anything other than a strict version match is a disaster waiting to happen if someone would manage to push out a point release for it by stealing juliangruber's credentials.
javascript  packaging  npm  opensource 
march 2016 by kme
jonschlinkert/marked-toc · GitHub
This worked. Just have to rip the generated TOC out of the file and then move it into Either this could be automated in a precommit hook, or else the NPM package could be patched.

DEPRECATED, use instead.
markdown  toc  tableofcontents  npm  node  package  webdevel  commandline  javascript  library  solution 
october 2014 by kme

Copy this bookmark:

to read