-s install doesn't work in ubuntu

What I Wanted to Do

I wanted to save the package I installed with npm in package.json. I typed npm i express but it didn’t save, npm i express -s didn’t work either, so I tried npm i express --save and it saved express in dependencies in package.json. This has nothing to do with devDependencies tough.

What Happened Instead

The package I ran npm i on didn’t save even when i tried -s on it.

Platform Info

$ npm --versions
{ server: '1.0.0',
  npm: '3.5.2',
  ares: '1.14.0',
  cldr: '32.0.1',
  http_parser: '2.7.1',
  icu: '60.2',
  modules: '57',
  nghttp2: '1.30.0',
  node: '8.10.0',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.18.0',
  v8: '6.2.414.50',
  zlib: '1.2.11' }

$ node -p process.platform
linux

You are running npm 3.5.2, and the current version is 6.12.1, so the online documentation does not describe the behaviour you will be seeing.

From npm help install with npm 3.5.2:

-S, –save : Package will appear in your dependencies .