"ReferenceError: primordials is not defined" - NPM Install (Gulp Copy Assets) Failing
lilpxl opened this issue ยท 14 comments
Hey everyone! Excited to check out the new updates but running into the following error at the end of npm install
:
USER-NAME@COMPUTER-NAME THEME NAME % gulp copy-assets
ReferenceError: primordials is not defined
at fs.js:41:5
at req_ (/PATH-TO-THEME/wp-content/themes/THEME-NAME/node_modules/natives/index.js:143:24)
at Object.req [as require] (/PATH-TO-THEME/wp-content/themes/THEME-NAME/node_modules/natives/index.js:55:10)
at Object.<anonymous> (/PATH-TO-THEME/wp-content/themes/THEME-NAME/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
Appreciate the help!
Thanks @jaredsnider! There will be more coming from @danemorgan and @bacoords next week, we are planning a big update to the child theme to fix a lot of known errors, some of which have been around for a while and some of which were introduced when we updated some of the underlying code and dependencies in the 0.9.5 update.
Hey - thank you! Excited to see where Understrap goes, its a great tool. I'll keep fiddling around in the meantime (maybe use an earlier version of Node or update Gulp).
Hi @jaredsnider,
@bacoords has some work on the child theme high on his list! We feel your pain with the NPM process right now because the developers at HDC are also fighting it daily. I think what we're seeing in your error is a mismatch between dependency requirements, and I'm pretty sure the first goal Brian has is updating dependencies.
This is in progress now! but typically I find that a npm install node-sass
is what's missing to get the install process working.
Often you can still run gulp
tasks even after that error.
@howarddc @danemorgan @bacoords sincere thanks for your quick replies and hard work ๐ I prolly won't be back on it until this weekend but will definitely try your suggestions. Excited for the updates ๐
what is your output ofnode -v
and gulp -v
@jaredsnider did you download from the WordPress repository?
And are you running install in the parent or child theme folder?
@danemorgan the parent theme yes, but my issues are with the child theme downloaded here (just seeing the new release tho, gonna try that out now)... running everything in the child theme
Okay. Cool. I just wanted to make sure we were all in the same folder. ๐
@jaredsnider
I recommend grabbing the newer package file and gulp setup and running npm from scratch. You'll hopefully end up on gulp 4. You might have to move some things around, but probably not much.
@bacoords Huzzah! That fixed it :) - and can I say how nice it is to see that install output such clean results with minimal errors (been the opposite for a long time). Thank you all for your work on this - it is much appreciated!
As the latest child theme release seems to have fixed this I am closing it out. Thanks again everyone.
Excellent!