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

NPM Install warnings / deprecated packages | Windows 10 #624

Closed
1 task done
Thomas-A-Reinert opened this issue Mar 29, 2018 · 29 comments
Closed
1 task done

NPM Install warnings / deprecated packages | Windows 10 #624

Thomas-A-Reinert opened this issue Mar 29, 2018 · 29 comments

Comments

@Thomas-A-Reinert
Copy link
Contributor

Thomas-A-Reinert commented Mar 29, 2018

Issue is about..

  • a Bug Report

Please tell us about your environment:

  • WordPress Version: latest, Dev-Environment
  • OS Version: [Windows 10]
  • Browser: [Browser-independant]
  • Language: [Javascript | Node]
  • Node.js & NPM Versions: Node.js [V 8.9.2] | NPM [V 5.7.1]

Issue Overview for Bugreports

Steps to reproduce?

  • Get a clean install from "master"-branch.
  • console npm install on windows

Output:

npm install
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> uws@9.14.0 install F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> node-sass@4.8.3 install F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/win32-x64-57_binding.node
Download complete  ] - :
Binary saved to F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\node-sass\vendor\win32-x64-57\binding.node
Caching binary to C:\Users\phanthomas\AppData\Roaming\npm-cache\node-sass\4.8.3\win32-x64-57_binding.node

> node-sass@4.8.3 postinstall F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\node-sass
> node scripts/build.js

Binary found at F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine

> gifsicle@3.0.4 postinstall F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\gifsicle
> node lib/install.js

  √ gifsicle pre-build test passed successfully

> jpegtran-bin@3.2.0 postinstall F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\jpegtran-bin
> node lib/install.js

  √ jpegtran pre-build test passed successfully

> optipng-bin@3.1.4 postinstall F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\node_modules\optipng-bin
> node lib/install.js

  √ optipng pre-build test passed successfully

> understrap@0.8.1 postinstall F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap
> gulp copy-assets

[00:46:07] Using gulpfile F:\xampp7.1\htdocs\wordpress\wp-content\themes\understrap\gulpfile.js
[00:46:07] Starting 'copy-assets'...
[00:46:07] Finished 'copy-assets' after 136 ms
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN bootstrap@4.0.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1162 packages from 673 contributors in 179.888s

Expected behavior

Clean install without warnings etc.
Yes, I know the console npm WARN bootstrap@4.0.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself. cannot be avoided. But maybe there´s a chance to leave a note or whatever that it´s included with WP anyways?

Other Comments

Needs investigation by "Team Gulp". @0dp - would you be so kind to investigate? It would be REALLY awesome to have npm install running without any errors or warnings.

But hey I know - we don´t live in a perfect world ;) Just wanted to let you know to maybe improve the installation process in case you feel like

Note to "Team Documentation" - @holger1411 @axlright console gulp copy assets is run by default at the end of the installation process. So its not neccessary to mention that in the doc. Please remove.

@0dp
Copy link
Collaborator

0dp commented Mar 29, 2018

Sure thing @Thomas-A-Reinert please assign it to me so i don't forget 😜

@Thomas-A-Reinert
Copy link
Contributor Author

Thanks a lot, dude. Learning a lot from your gulp-adjustitions atm ;)

@0dp
Copy link
Collaborator

0dp commented Mar 30, 2018

We need to do is upgrade to gulp v. 4.0 it seems to remove the deprecation warnings, but in doing so we will have to update the gulp file and check all the tasks

@Thomas-A-Reinert
Copy link
Contributor Author

So would you please as soon as you find the time? Thanks in advance!

@0dp
Copy link
Collaborator

0dp commented Apr 1, 2018

Yup, I'll look into it tonight and make a PR to review

@axlright
Copy link
Collaborator

axlright commented Apr 2, 2018

Happy to help here but me no have no Windows. Otherwise, let me know if / how to help.

@0dp
Copy link
Collaborator

0dp commented Apr 2, 2018

I'm about to finish up a complete refactored gulp file with cleaned up tasks, optimized for gulp4.

Some steps are also required from the user, specifically removing gulp locally, and installing gulp-cli.

Thorough testing is needed though, cuz I have no idea what implications this might have on other projects still using gulp 3.9.

The gulp team is not holding up too good it seems.

Anyways, I will post an update later tonight

@0dp
Copy link
Collaborator

0dp commented Apr 2, 2018

@axlright @Thomas-A-Reinert
It's with shivering hands and cold sweaty palms I present the update to gulp4. Including updated and optimized gulp tasks, and refactoring slimming down the code 100+ lines.

Please test and report back, with any questions, bugs, and errors you find.
https://github.com/0dp/understrap/tree/gulp4

In order to get things to work, you'll have to remove gulp locally
npm rm -g gulp

Then you have to install the new gulp-cli
npm install -g gulp-cli

gulp -v should now report something like CLI version 2.0.1

Will gulp-cli in favor of gulp3.9.x break everything else? I don't know, let's find out

Some tasks are missing? Yes, I removed them, what did they do?

@0dp
Copy link
Collaborator

0dp commented Apr 24, 2018

¡Hola! any testers available

@breath-ee
Copy link

breath-ee commented Apr 30, 2018

  • WordPress v4.9.5
  • OSX 10.11.6 - EL Captain
  • FireFox 59.0.2
  • npm v5.6.0
  • Homebrew 1.6.2
  • Homebrew/homebrew-core (git revision 0f322; last commit 2018-04-30)
  • Apache/2.4.33 (Unix) OpenSSL/1.0.2o PHP/7.1.14 (stable 7.2.5 (bottled))

Ran from within the understap theme folder:

sudo npm rm -g gulp

up to date in 0.067s

sudo npm install -g gulp-cli

/usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp-cli/bin/gulp.js
gulp-cli@2.0.1
added 145 packages, removed 46 packages, updated 38 packages and moved 3 packages in 13.47s

gulp -v

CLI version 2.0.1
Local version 3.9.1

Final output:

understrap@0.8.2 postinstall /Users/username/public_html/clients/domain.com/public_html/wp-content/themes/understrap
gulp copy-assets

Using gulpfile ~/public_html/clients/domain.com/public_html/wp-content/themes/understrap/gulpfile.js
Starting 'copy-assets'...
Finished 'copy-assets' after 160 ms

npm WARN bootstrap@4.1.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.

up to date in 22.295s

All working. Despite the jQuery error.

Adding "jquery": "^1.9" to the package.json then running npm install seems to correct this error message. I thought jQuery was already bundled in with Understrap?

@pattonwebz
Copy link
Contributor

@breath-ee jQuery is bundled directly with WordPress. Understrap calls it in as a dependency when enquing the main bootstrap javascript file so is available when needed :)

@Thomas-A-Reinert
Copy link
Contributor Author

It´s already bundled and enqueued by default by WordPress. All good - no need to add/change anything.
Please try - do not add jQuery to the package.json, and try if it works..

@Thomas-A-Reinert
Copy link
Contributor Author

Oh seems @pattonwebz was a bit faster. Anyway: Statement confirmed ;)

@breath-ee
Copy link

Doh totally forgot about that! There must be a way to suppress that npm message.

@0dp
Copy link
Collaborator

0dp commented Apr 30, 2018

@breath-ee not really and you shouldn't.

Best way to sort it is to add jquery as a peer dependency to the projects package.json
I really doesn't matter if jquery is also downloaded into the node_modules

@breath-ee
Copy link

As an update I just tried a fresh git clone, ran npm install and got the same errors before trying the gulp re-install as outlined above.

  • WordPress v4.9.5
  • OSX 10.11.6 - EL Captain
  • FireFox 59.0.2
  • npm v5.6.0
  • Homebrew 1.6.2
  • Homebrew/homebrew-core (git revision 0f322; last commit 2018-04-30)
  • Apache/2.4.33 (Unix) OpenSSL/1.0.2o PHP/7.1.14 (stable 7.2.5 (bottled))

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated natives@1.1.3: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

Not sure if this is brew/osx issue:

⚠ The /Users/username/public_html/demos/wordpress/public_html/wp-content/themes/understrap/node_modules/jpegtran-bin/vendor/jpegtran binary doesn't seem to work correctly
⚠ jpegtran pre-build test failed
ℹ compiling from source
✖ Error: touch configure.ac aclocal.m4 configure Makefile.am Makefile.in && ./configure --disable-shared --prefix="/Users/username/public_html/demos/wordpress/public_html/wp-content/themes/understrap/node_modules/jpegtran-bin/vendor" --bindir="/Users/username/public_html/demos/wordpress/public_html/wp-content/themes/understrap/node_modules/jpegtran-bin/vendor" && make install
Command failed: ./configure --disable-shared --prefix="/Users/username/public_html/demos/wordpress/public_html/wp-content/themes/understrap/node_modules/jpegtran-bin/vendor" --bindir="/Users/username/public_html/demos/wordpress/public_html/wp-content/themes/understrap/node_modules/jpegtran-bin/vendor"
configure: error: installation or configuration problem: assembler cannot create object files.

at ChildProcess.exithandler (child_process.js:282:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:947:16)
at Socket.stream.socket.on (internal/child_process.js:368:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:598:12)

Hopefully with a few more testers this gulp issue can be updated.

@0dp
Copy link
Collaborator

0dp commented Apr 30, 2018

I just want to inform everyone, that the real deprecation warnings has to do with gulp v3.9 in order to kill those gulp-cli, local gulp needs to be upgraded to latest. Package.son needs to be upgraded with newest deps. Deprecated packages needs to be replaced. Finally gulfile.js needs to be upgraded.

Feel free to test my gulp4 branch

@dylannirvana
Copy link

I am still getting these in Terminal:

  • gulp@3.9.1
    updated 1 package and audited 25551 packages in 13.878s
    found 52 vulnerabilities (12 low, 32 moderate, 8 high)
    run npm audit fix to fix them, or npm audit for details
    $ gulp -v
    [20:44:15] CLI version 2.0.1
    [20:44:15] Local version 3.9.1

@0dp
Copy link
Collaborator

0dp commented Jun 4, 2018

@dylannirvana since you we are not using any of the packages in the final dist of the theme you can ignore them. If you think otherwise feel free to npm audit fix them, if it does not resolve the 'issues' you will have to contact package authors 👍

@0dp
Copy link
Collaborator

0dp commented Jun 4, 2018

New update to my gulp4 branch https://github.com/0dp/understrap/tree/gulp4

@J-Regan
Copy link

J-Regan commented Jun 6, 2018

@0dp That is good news. I had the same terminal messages as @dylannirvana and spent ages trying to figure out what was going on. Thanks for all the work on this theme.

@0dp
Copy link
Collaborator

0dp commented Jun 7, 2018

New update to my gulp4 branch, now with Revision strategy.
https://github.com/0dp/understrap/tree/rev-del

@holger1411 @Thomas-A-Reinert @axlright and who ever got a spare minute. Please test and review

@axlright
Copy link
Collaborator

@0dp sorry for crapping the bed repeatedly over the past few months. I've been rebuiling my whole operations' time tracking and billing and accounting system. Tried to stay focused on that so I ignored my people over at UnderStrap. I'm close to finishing up all that other distracting work. And man is it boring. So I can hopefully move attention back to you all.

Admittedly I am a total npm idiot. I can do what I'm told, though.

Just cloned your repo and threw it into my local testing environment. All is well with some warnings that seem to be the same as always with npm install. Thanks for all your help. Details below.

WordPress Version: 4.9.6
OS Version: OSX 10.13.5
Node.js : 9.11.1 (I can install any version via nvm if you need)
NPM: 5.6.0

npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

Are the only warnings I get. No errors.

@0dp
Copy link
Collaborator

0dp commented Jun 25, 2018

All good fam.

@posadallano
Copy link

@0dp Worked for me, thanks for your help man!

@0dp
Copy link
Collaborator

0dp commented Aug 3, 2018

Holger created a branch called Gulp4 where i've been pushing a few updates

@0dp
Copy link
Collaborator

0dp commented Dec 28, 2018

New gulp4 PR #883

@dluxcru dluxcru mentioned this issue Jan 12, 2019
5 tasks
@IanDelMar

This comment was marked as off-topic.

@Thomas-A-Reinert
Copy link
Contributor Author

Yup.

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

No branches or pull requests

10 participants