1

When I download "Intermediate - Advanced users" version of polymer starter kit from github here and on the 4th step of these instructions here I always getting these WARNs:

$ sudo npm install
npm WARN deprecated gulp-minify-css@1.2.4: Please use gulp-clean-css
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN engine launchpad@0.5.1: wanted: {"node":"^0.12"} (current: {"node":"4.4.2","npm":"2.15.0"})
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN optional dep failed, continuing fsevents@1.0.11
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade

No matter what OS I'm using: tried both Ubuntu and Windows (git bash).

I have npm, bower, gulp installed globally but there's always those WARNs.

I think that maybe it's a dependencies problem or it's because of some code in some of polymer starter kit files, but I'm not a pro developer, so I can't find what is causing the problem

It's all seems to work though when I deploy the project, but I'm new to web dev and not sure if I have to just close my eyes on these WARNs

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
Un1
  • 3,874
  • 12
  • 37
  • 79
  • Can you explain a bit more? – Dieter Meemken Apr 14 '16 at 10:30
  • Well, I edited the post with some additional information, but not sure what kind of information would be helpful with this problem :( – Un1 Apr 14 '16 at 10:45
  • 1
    Welcome to Stack Overflow! Do not vandalise or edit important information out of your post. This question is supposed to remain for other users to benefit from, for posterity. You are not permitted to significantly worsen or vandalize your own posts on StackOverflow, as you have irrevocably licensed the post and its content to StackExchange under the CC BY SA license upon posting. – Ferrybig Apr 14 '16 at 11:19
  • @Un1 Kindly do not deface or vandalize your post. – Praveen Kumar Purushothaman Apr 14 '16 at 11:19
  • @Ferrybig, sorry, just learning how does revisions logic of the stackoverflow working and decided to remove additional question that probably won't be related – Un1 Apr 14 '16 at 11:24
  • If this question is no longer relevant, use the "delete" button, this prevents people finding the post and reporting it, and you won't get any negativity anymore if its deleted – Ferrybig Apr 14 '16 at 11:26
  • See http://stackoverflow.com/questions/34840153/npm-deprecated-warnings-do-i-need-to-update-something and http://stackoverflow.com/questions/33974189/npm-warn-deprecated-lodash2-4-2-lodash3-0-0-is-no-longer-maintained –  Apr 14 '16 at 11:42
  • @Ferrybig thanks for advice! – Un1 Apr 14 '16 at 11:52

2 Answers2

0

Nothing to worry about with those warnings. Those come from the npm packages that are set as dependencies in the package.json file. When you run npm install it will install all packages set in the package.json. Every single package has their own package.json that also has some dependenices. Each package install their own needed version of that package and sometimes they use older versions of those packages. Only way to get rid of those warnings would be to get the package creators to update their packages.

Only package that you can update yourself is the gulp-minify-css. You can uninstall that package npm remove gulp-minify-css --save-dev and install the newer non-deprecated version gulp-clean-css. npm install gulp-clean-css --save-dev. If you do that you need to update the gulpfile.js for the project to use the new package.

Find the styleTask for the starter-kit in the gulpfile.js:

var styleTask = function(stylesPath, srcs) {
return gulp.src(srcs.map(function(src) {
  return path.join('app', stylesPath, src);
}))
.pipe($.changed(stylesPath, {extension: '.css'}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp/' + stylesPath))
.pipe($.minifyCss())
.pipe(gulp.dest(dist(stylesPath)))
.pipe($.size({title: stylesPath}));
};

and change the .pipe($.minifyCss()) row to be .pipe($.cleanCss({compatibility: 'ie10'})) Now you have managed to update the starter-kit to use newer non-deprecated package.

Many packages in the npm package manager have some deprecated packages or cause other warnings while installing but most of the time there is no need to worry.

Snekw
  • 2,590
  • 1
  • 15
  • 24
0

No need to worry about those warnings in this case. They shouldn't cause the problems that you allude to. I verified the PSK guide you mentioned (the page completely appears and functions without error in Chrome Version 49.0.2623.112 on OSX El Capitan).

npm displays deprecation warnings when a dependency being installed has been deprecated by the dependency's package owner/maintainer usually in favor of another package/version that has significant improvements. Packages can be deprecated/undeprecated at will and long after your app has been deployed.

For example, in January, you release an app that depends on gulp-minify-css@1.2.4. The owner of gulp-minify-css no longer has time to maintain the package, so he decides in March to deprecate it in favor of the actively maintained gulp-clean-css. Now, users who npm install your app (which also installs gulp-minify-css) see this deprecation warning, but your app still functions normally. The deprecation does not invalidate your app or cause errors.

While normally one might try to upgrade the dependencies to remove the warnings, that is not recommended for PSK due to package incompatibilities as recently discovered in a pull request:

So I just took this for a spin and I ran into some issues :( although the current gulp plugins are deprecated they are working for the community! This PR represents a "high risk" change, that we have found to be breaking in several odd ways. For that reason I am going to close this PR for now. That said let's revisit this PR in a few months and see if things have stabilized more.

  • thank you too Tony, now it's clear to me. You guys are awesome, thanks for the time ya'll spent to test and write the solution here – Un1 Apr 14 '16 at 11:54