volodymyr-lisniak / magento-2-gulp

Gulp for Magento 2. It works with core Magento styles (less) and structure. Uses default theme configs from dev/tools/grunt/configs/local-themes.js.
MIT License
41 stars 12 forks source link

TypeError: plugins.expectFile is not a function #23

Closed shivampmc closed 2 years ago

shivampmc commented 3 years ago

I found this tool today and when I tried I got this error. Is it something that I am doing wrong?

[16:23:20] Using gulpfile C:\xampp\htdocs\m2\gulpfile.js [16:23:20] Starting 'critical'... Running gulp task Critical CSS compilation for 1 theme(s): pmcArceus [16:23:20] 'critical' errored after 17 ms [16:23:20] TypeError: plugins.expectFile is not a function at C:\xampp\htdocs\m2\dev\tools\gulp\tasks\critical.js:44:31 at Array.forEach () at module.exports (C:\xampp\htdocs\m2\dev\tools\gulp\tasks\critical.js:41:36) at critical (C:\xampp\htdocs\m2\node_modules\undertaker\lib\set-task.js:13:15) at bound (domain.js:413:15) at runBound (domain.js:424:12) at asyncRunner (C:\xampp\htdocs\m2\node_modules\async-done\index.js:55:18) at processTicksAndRejections (internal/process/task_queues.js:75:11)

volodymyr-lisniak commented 3 years ago

@shivampmc which gulp version are you using? Show me your gulp -v and node -v

congson95dev commented 2 years ago

I've faced this issue last week, and this is because package.json in root folder of project are not paste correct from this git. image All of this gulp was never come to my package.json Here's my package.json, it don't have gulp at all. image To solve this problem, i backup that package.json to package.json.bak then run as normal. Maybe you could try manual copy all gulp to package.json then run again.

volodymyr-lisniak commented 2 years ago

@saxsax1995 You won't have package.json content from this git repository. It would help if you did this manually.

From README.md:

package json