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

Problems running gulp. #878

Closed
1 task
DouglasEvans opened this issue Dec 24, 2018 · 21 comments
Closed
1 task

Problems running gulp. #878

DouglasEvans opened this issue Dec 24, 2018 · 21 comments

Comments

@DouglasEvans
Copy link

DouglasEvans commented Dec 24, 2018

Edit: Originally this was titled "Can't run NPM Install" but it appears my problems are more specific to gulp instead.

Hello, I have downloaded a fresh copy of Understrap and when I attempt to run npm install I get the below error message.

Issue is about..

  • I need help

Please tell us about your environment:

  • WordPress Version: 5.0.2
  • OS Version: Windows 8.1
  • Browser: Chrome 71.0.3578.98
  • Language: all
  • Node.js & NPM Versions: Node.js v10.14.2 | NPM v6.4.1
  • Gulp Versions: CLI version 2.0.1 | Local version 3.9.1

`> node-sass@4.9.4 install C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\node-sass

node scripts/install.js

Cached binary found at C:\Users\USER\AppData\Roaming\npm-cache\node-sass\4.9.4\win32-x64-64_binding.node

node-sass@4.9.4 postinstall C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\node-sass
node scripts/build.js

Binary found at C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\node-sass\vendor\win32-x64-64\binding.node
Testing binary
Binary is fine

gifsicle@3.0.4 postinstall C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\gifsicle
node lib/install.js

 gifsicle pre-build test passed successfully

jpegtran-bin@3.2.0 postinstall C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\jpegtran-bin
node lib/install.js

 jpegtran pre-build test passed successfully

optipng-bin@3.1.4 postinstall C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\optipng-bin
node lib/install.js

 optipng pre-build test passed successfully

understrap@0.8.8 postinstall C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap
gulp copy-assets

internal/util/inspect.js:31
const types = internalBinding('types');
^

ReferenceError: internalBinding is not defined
at internal/util/inspect.js:31:15
at req_ (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:137:5)
at require (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:110:12)
at util.js:25:21
at req_ (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:137:5)
at require (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:110:12)
at fs.js:42:21
at req_ (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:137:5)
at Object.req [as require] (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:54:10)
at Object. (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:99)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! understrap@0.8.8 postinstall: gulp copy-assets
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the understrap@0.8.8 postinstall 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:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2018-12-24T23_22_31_485Z-debug.log`

Thank you.

@DouglasEvans DouglasEvans changed the title Can't run NPM Install Problems running gulp. Dec 24, 2018
@DouglasEvans
Copy link
Author

If I attempt to run gulp watch I receive this output:


internal/util/inspect.js:31
const types = internalBinding('types');
^

ReferenceError: internalBinding is not defined
at internal/util/inspect.js:31:15
at req_ (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:137:5)
at require (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:110:12)
at util.js:25:21
at req_ (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:137:5)
at require (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:110:12)
at fs.js:42:21
at req_ (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:137:5)
at Object.req [as require] (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\natives\index.js:54:10)
at Object. (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:99)

@DouglasEvans
Copy link
Author

Having tried a few more things I've been able to get the child theme working and editable, I still haven't had any luck with the parent theme but I thought I would have been able to edit it all the same.

@0dp
Copy link
Collaborator

0dp commented Dec 25, 2018

Hi @DouglasEvans Thanks for your bug report.
I am able to reproduce the issue with a clean install.

CLI version 2.0.1
Local version 3.9.1

I am going to copy paste this reply from another thread I read:

It looks like this error is because Gulp 3.9.1 depends on natives, which suffered a regression. Gulp 4 is now officially latest, so we should look to upgrade to the latest version of Gulp to fix this issue.

#713
#735
#723
#779

@holger1411 FYI!

@DouglasEvans
Copy link
Author

HI @0dp thanks for getting back to me, I've been able to upgrade my local gulp to version 4.0.0 while CLI version is still 2.0.1

I attempted to run npm install again but this time I received this error.

understrap@0.8.8 postinstall C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap
gulp copy-assets

assert.js:350
throw err;
^

AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\undertaker\lib\set-task.js:10:3)
at Gulp.task (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\node_modules\undertaker\lib\task.js:13:8)
at Object. (C:\xampp\htdocs\WEBSITE\wp-content\themes\understrap\gulpfile.js:58:6)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! understrap@0.8.8 postinstall: gulp copy-assets
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the understrap@0.8.8 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@0dp
Copy link
Collaborator

0dp commented Dec 27, 2018

Hi @DouglasEvans

That is correct, the tasks needs to be rewritten to comply with gulp4.

Please checkout the gulpfile and corresponding package.json file in the understrap gulp4 branch.

@0dp
Copy link
Collaborator

0dp commented Dec 28, 2018

@DouglasEvans take a look at this PR
#883

@ernestorivero
Copy link

ernestorivero commented Feb 3, 2019

I've solved the issue by installing specific versions for node, npm and gulp, they are:

  • Node v6.10.0
  • Npm 3.10.10
  • Gulp CLI version 3.9.1

It runs perfectly now. I hope it helps.

@0dp
Copy link
Collaborator

0dp commented Feb 5, 2019

Yes, you can downgrade gulp but we might see issues with that in the future

@brigleb
Copy link

brigleb commented Feb 11, 2019

Whoa. I'm having the exact same problem, but I'm on Gulp 3.9.1 like @ernestorivero ... However, my Node version is 11.9.0 and npm is 6.5.0 ... strange. I'll check out that PR mentioned above.

@0dp
Copy link
Collaborator

0dp commented Feb 11, 2019

Whoa. I'm having the exact same problem, but I'm on Gulp 3.9.1 like @ernestorivero ... However, my Node version is 11.9.0 and npm is 6.5.0 ... strange. I'll check out that PR mentioned above.

Maybe you could post the output of gulp -v ?

@brigleb
Copy link

brigleb commented Feb 11, 2019

Sure, my apologies.

➜  understrap git:(master) ✗ gulp -v
[10:01:00] CLI version 2.0.1
[10:01:00] Local version 3.9.1
➜  understrap git:(master) ✗ npm --version
6.5.0
➜  understrap git:(master) ✗ node --version
v11.9.0

I looked at the PR but can't really tell if it's going to make things better or worse for me! 🤷🏻‍♂️

@0dp
Copy link
Collaborator

0dp commented Feb 11, 2019

Before I give you dubious advice. Do you mind showing me the errors of, npm install

@danieldevos
Copy link

Good morning, everyone,
I also have the same problem impossible to use gulp on a new installation of understrap 0.9.1 here is my configuration

gulp -v
CLI version 2.1.0
Local version 4.0.0.0

node -v
v10.15.3

npm -v
6.4.1

If a solution exists, would you have a link to propose to me? I thank you in advance for your help

Dan

@valeriykaminskyy
Copy link

Had same issue, try to this solution npm install natives@1.1.6

@ejooPasco
Copy link

Just as feedback: had the same problem with:
$ gulp -v
CLI version: 2.2.0
$ npm -v
6.4.1
$ node -v
v10.15.2

valeriykaminskyy's solution worked, thanks

@danieldevos
Copy link

Hi,
The problem is not solved but I did several tests and the problem is just present on Local by Flywheel I tried on mamp no problem and on a virtual box no problem.

Regards

@Thomas-A-Reinert
Copy link
Contributor

@danieldevos I wonder how a webserver could affect the gulp build-process. They´re two totally different applications that should not interfer each other. Besides I got my local setup also running under Local by Flywheel and never experienced any problem. Just as a notice..

@danieldevos
Copy link

You're right and I can't explain it either but that's what I could see and the return error is on the version of nodejs I use V10

@MaikelGG
Copy link

MaikelGG commented Jun 9, 2019

For me yarn upgrade in my project worked, I see it set natives to version 1.1.6 as valeriykaminskyy said. If you are using yarn you can also check https://yarnpkg.com/en/docs/selective-version-resolutions, which can help solve these kind of problems.

@danieldevos
Copy link

Thank you MaikelGG
Your solution works for me
Thank you for your help
Dan

@gbrits
Copy link

gbrits commented Jun 11, 2019

npm install gulp updated mine and fixed the problem

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

No branches or pull requests

10 participants