vigetlabs / blendid

A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
MIT License
4.97k stars 682 forks source link

Error when running blendid (yarn run blendid -- init) #469

Closed NoLooseEnds closed 7 years ago

NoLooseEnds commented 7 years ago

Brand new OS X. Brand new project folder.

Did: yarn init yarn add blendid yarn run blendid -- init

And it gives me this:

[<username>:...tvikling/domain.com/dev3]$ yarn run blendid -- init
yarn run v0.27.5
$ "/Users/<username>/Sync/_utvikling/domain.com/dev3/node_modules/.bin/blendid" "init"
[15:59:46] Working directory changed to ~/Sync/_utvikling/domain.com/dev3/node_modules/blendid
/Users/<username>/Sync/_utvikling/domain.com/dev3/node_modules/require-dir/index.js:97
            if (!require.extensions.hasOwnProperty(ext)) {
                                    ^

TypeError: require.extensions.hasOwnProperty is not a function
    at requireDir (/Users/<username>/Sync/_utvikling/domain.com/dev3/node_modules/require-dir/index.js:97:37)
    at Object.<anonymous> (/Users/<username>/Sync/_utvikling/domain.com/dev3/node_modules/blendid/gulpfile.js/index.js:22:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Liftoff.handleArguments (/Users/<username>/Sync/_utvikling/domain.com/dev3/node_modules/gulp/bin/gulp.js:116:3)
Done in 0.30s.
greypants commented 7 years ago

what node version?

NoLooseEnds commented 7 years ago

I'm guessing the latest 8.1.3 via Brew, but this is on a brand new work iMac – and I'm off on summer vacation. I'll try to remember to check it when I get back to work in three weeks time.

Edit: I remoted in. It's 8.1.3

dhait commented 7 years ago

Exactly the same problem. I am on node 8.1.4.

mzlock commented 7 years ago

Per a comment here: https://github.com/tjunnone/npm-check-updates/issues/363

Sounds like node 8.0 dropped support for require.extensions

ryanlloydfrench commented 7 years ago

Hi, I am experiencing the exact same issue.

Node Version: 8.2.1

rshl commented 7 years ago

This should fix the problem temporarily:

tl;dr: update "require-dir" to 0.3.2


1. Move to the blendid folder and delete the node_modules directory

cd <project-folder>/node_modules/blendid
rm -Rf node_modules

2. Now open the package.json within the blendid folder and change following line:

"require-dir": "0.3.1"

to

"require-dir": "0.3.2"

3. reinstall blendid packages within the blendid folder

npm i

ryanlloydfrench commented 7 years ago

@rshl Cheers, this worked.

greypants commented 7 years ago

Node 8 issue is fixed in 4.2.0