Closed christian70 closed 3 years ago
Hi @christian70
It seems to be because package-lock.json has node-sass 4.8.3. Also it happens me with understrap-child.
Dealing with a similar issue for the greater part of the morning. Here's what I did to make it work.
Bonus: I went ahead and made sure all packages were up to date with npm-check-updates
Sorry, I'm pretty new to all this. Up to now my installations have been successfull. So @DKapin you suggest me:
I've made a try, but this is the annoying result:
C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE>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 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.6: 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: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
gifsicle@4.0.1 postinstall C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\gifsicle node lib/install.js
√ gifsicle pre-build test passed successfully
jpegtran-bin@4.0.0 postinstall C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\jpegtran-bin node lib/install.js
√ jpegtran pre-build test passed successfully
optipng-bin@5.1.0 postinstall C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\optipng-bin node lib/install.js
√ optipng pre-build test passed successfully
understrap-child@0.5.3 postinstall C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE gulp copy-assets
fs.js:35 } = primordials; ^
ReferenceError: primordials is not defined
at fs.js:35:5
at req_ (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\natives\index.js:143:24)
at Object.req [as require] (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\natives\index.js:55:10)
at Object.gulp copy-assets
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the understrap-child@0.5.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@christian70
to delete node-modules folder (I could reload original files from child theme); also, should I delete package-lock.json from child theme files?
Yes, if you currently have a node-modules directory within your theme, go ahead and remove it to start from a clean slate. Go ahead and remove the package-lock.json file as well. All of this should be done within the child-theme. You shouldn't have to touch the parent understrap theme.
run npm install node-sass --save or similar... which is the best command for that?
npm install --save-dev node-sass
should work
should I delete the line "understrap": "^0.8.9" from dependences? anything else?
Yes, having understrap installed within the child theme caused additional issues. They were resolved once I removed it as a dependency.
In the end, should I run npm-check-updates? anything else?
Only if you want. That step wasn't necessary for me to get everything working.
I've made a try, but this is the annoying result:
Do you know what gulp version you're using? I think this is an indication that you're trying to run gulp 3 with node 12. If this is the case, you'd either need to bring your gulp version up to 4 or bring your node version down below 12.
I installed the newest gulp version and then ran gulp -v in my root folder: CLI version: 2.2.0 Local version: 4.0.2
but CLI version: 2.2.0 Local version: 3.9.1 in my child-theme folder. There's something wrong with it, isn't there?
Which version of the child theme are you using? If you're using anything before version 0.5.5, you'll probably want to stick with your current local Gulp 3 version.
If you use Gulp 4 with anything before 0.5.5, you'd need to rebuild the gulpfile to match the new Gulp 4 syntax. It might be easier to stick with Gulp 3 and use something like NVM for Windows to switch back to an earlier version of Node when you need it.
I'm using 0.5.3 version, this is the latest version I managed to download today. So what would you suggest to do to make it work perfectly? I'm new to this, I can't even understand the difference between gulp version in folders... I thought it was installed globally. I need to make everything consistent and stable...
@christian70 If you want to stick with that version, I would look into something like NVM for Windows so you can switch back to a version of Node before 12. This should allow you to get past that primordials is not defined error.
Ok I will try NVM. Otherwise I should test a different version of the child theme, shouldn't I? Any idea of which one could it do for me? And what about the Understrap parent theme, is the 0.9.4 version ok yet?
Yeah, I think that parent theme version should be fine.
The child theme version I used was 0.5.5 which uses Gulp 4 out of the box.
@nvjacobo did you manage to fix it? I'm a bit in a mess with versions and all that stuff...
@nvjacobo did you manage to fix it? I'm a bit in a mess with versions and all that stuff...
Hey @christian70. Yes. I deleted package-lock.json and then npm install
For context: @Thomas-A-Reinert told and explain to me it is because understrap/Understrap and understra/understrap-child are having development and management issues #254
@nvjacobo I'm truly sad about what I read on #254. I didn't imagine that was the actual situation of Understrap project. It used to be my favourite starting theme, now I'm worried about future maintenance. Thank you for your kind support, tomorrow I will have a try.
@nvjacobo I deleted package-lock.json and then npm install (as you suggested) but there's no way for me to install the child theme (at the contrary, the parent theme installation and activation work perfectly). I'm seriously think on changing my WP starting theme in the future... what a pity.
We are many people who are not appreciating the way things are going, and we're trying to come up with a solution that is beneficial for the whole community.
But it will take some time.
On Mon, 6 Apr 2020, 15.18 christian70, notifications@github.com wrote:
@nvjacobo https://github.com/nvjacobo I deleted package-lock.json and then npm install (as you suggested) but there's no way for me to install the child theme (at the contrary, the parent theme installation and activation work perfectly). I'm seriously think on changing my WP starting theme in the future... what a pity.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/understrap/understrap-child/issues/260#issuecomment-609788447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3ZH7326VNRIQLSP2UTVGTRLHJA5ANCNFSM4LX2C7PA .
@0dp I understand, I was not complaining against your remarkable efforts, I'm a bit frustrated because it used to be my favorite starting theme on Wordpress projects. I do hope that everything will be solved soon.
@nvjacobo I don't know what's happened, but after a couple of attempts - and after deleting package-lock.json - I managed to install the child theme. It seems to work now, even if a bit slow in compiling. Thanks a lot.
I know I know 😉
@christian70 and @DKapin : I never said that the original devs are currently abandonding this repo. I´m just saying that we´re thinking of an alternative and will think about a new home for our own repo, that´s supposed to be compatible.
That takes some time in fact and i´m currently working for government sites so that does take all my time. I guess we all totally agree that we will only spend SPARE time on this project. We don´t NEED to keep it going, it´s not ours – we just want to.
Thanks all :) @christian70 @0dp @Thomas-A-Reinert
I have some questions.
Why is this happening?
How I can help?
Thank you @Thomas-A-Reinert
@nvjacobo
Why is this happening
What is the status here? I am looking for a new starter theme / framework and thought I found what I was looking for... before reading few issue conversations here. Now it does not seem to be a safe choice :-(
@arijuki Nothing has changed that I know of. Since @UnderstrapFramework bought the project, he's turned off many (all?) of the community developers so the project isn't being maintained with the same level of care as it was before. I'm still using it but am self maintaining as I've been using this framework for years.
Thanks @DKapin, almost made it work, unfortunately, the imports
@import "../src/sass/understrap/understrap/understrap"; // <------- Loads the UnderStrap defaults. Just a few classes to incorporate BS in WP
@import "../src/sass/understrap/understrap/woocommerce"; // <------- Loads WooCommerce style fixes. Comment out if you aren't using WooCommerce
@import "../src/sass/understrap/theme/contact-form7"; // <------- Loads some basic styling for contact form 7 plugin
are not working anymore
I used to love this theme, now it's hardly usable :(
I'm having similar issues with npm install for the main understrap theme and the child theme. I hadn't had any problems until now, but I get the errors even if I download a fresh copy of the theme from the website and run npm install
Dealing with a similar issue for the greater part of the morning. Here's what I did to make it work.
- Make sure package-lock.json and node-modules are deleted
- Installed node-sass
- Inside of package.json, I corrected "undescores-for-npm" to "underscores-for-npm" (missing an 'r')
- Inside of gulpfile.js I did the same spelling fix under the copy-assets function.
- Make sure understrap is not a dependency within your package.json
- Ran npm install Everything worked following this
Bonus: I went ahead and made sure all packages were up to date with npm-check-updates
as per following the instructions from sir @DKapin : I still got errors upon following it but get it to work on the child theme by also making sure that the parent understrap files are also updated as well.. my first attempt only updating files in the child theme and running npm install in the child fails. also another caveat to this is that if your setup is similar to mine on xampp on windows and using vscode terminal, it would throw you permission errors that warns you about an editor or something is already using the files. So I used the nodejs command prompt for sureness sake.
Hope this was helpful too like how helpful sir @DKapin to me
Happy Coding Y'all =)
Dealing with a similar issue for the greater part of the morning. Here's what I did to make it work.
- Make sure package-lock.json and node-modules are deleted
- Installed node-sass
- Inside of package.json, I corrected "undescores-for-npm" to "underscores-for-npm" (missing an 'r')
- Inside of gulpfile.js I did the same spelling fix under the copy-assets function.
- Make sure understrap is not a dependency within your package.json
- Ran npm install Everything worked following this
Bonus: I went ahead and made sure all packages were up to date with npm-check-updates
This was bang on the money. Thank you!
FYI This has been addressed in the latest updates. Please open a new issue if you see any npm install
bugs happening.
Issue is about..
Please tell us about your environment:
When does this occur?
I installed Understrap master successfully bu during Understrap child theme installation (npm install) I get lots of errors (see below). There's no way to make the child theme work. Thanks for your help and suggestions.
Microsoft Windows [Versione 10.0.18362.720] (c) 2019 Microsoft Corporation. Tutti i diritti sono riservati.
C:\Users\Christian>cd C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE
C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE>npm install
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-72_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-72_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.
or configure npm proxy via
Building: C:\Program Files\nodejs\node.exe C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\Program Files\nodejs\node.exe', gyp verb cli 'C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\node-gyp\bin\node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' gyp verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@12.16.1 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:166:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\node-sass
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
which
failed Error: not found: python2 gyp verbwhich
failed at getNotFoundError (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:80:29) gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:89:16 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:166:21) gyp verbwhich
failed python2 Error: not found: python2 gyp verbwhich
failed at getNotFoundError (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:80:29) gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:89:16 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:166:21) { gyp verbwhich
failed stack: 'Error: not found: python2\n' + gyp verbwhich
failed ' at getNotFoundError (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:13:12)\n' + gyp verbwhich
failed ' at F (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:68:19)\n' + gyp verbwhich
failed ' at E (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:80:29)\n' + gyp verbwhich
failed ' at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:89:16\n' + gyp verbwhich
failed ' at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\index.js:42:5\n' + gyp verbwhich
failed ' at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\windows.js:36:5\n' + gyp verbwhich
failed ' at FSReqCallback.oncomplete (fs.js:166:21)', gyp verbwhich
failed code: 'ENOENT' gyp verbwhich
failed } gyp verb check python checking for Python executable "python" in the PATH gyp verbwhich
failed Error: not found: python gyp verbwhich
failed at getNotFoundError (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:80:29) gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:89:16 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:166:21) gyp verbwhich
failed python Error: not found: python gyp verbwhich
failed at getNotFoundError (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:80:29) gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:89:16 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:166:21) { gyp verbwhich
failed stack: 'Error: not found: python\n' + gyp verbwhich
failed ' at getNotFoundError (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:13:12)\n' + gyp verbwhich
failed ' at F (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:68:19)\n' + gyp verbwhich
failed ' at E (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:80:29)\n' + gyp verbwhich
failed ' at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\which\which.js:89:16\n' + gyp verbwhich
failed ' at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\index.js:42:5\n' + gyp verbwhich
failed ' at C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\isexe\windows.js:36:5\n' + gyp verbwhich
failed ' at FSReqCallback.oncomplete (fs.js:166:21)', gyp verbwhich
failed code: 'ENOENT' gyp verbwhich
failed } gyp verb could not find "python". checking python launcher gyp verb could not find "python". guessing location gyp verb ensuring that file exists: C:\Python27\python.exe gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\wamp64\www\sites\NEWSITE\wp-content\themes\NEWSITE\node_modules\node-gyp\lib\configure.js:484:19) gyp ERR! stack at PythonFinder.npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.11.0 postinstall:
node scripts/build.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.11.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.