luangjokaj / wordpressify

🎈 Automate your WordPress development workflow.
http://www.wordpressify.co
MIT License
1.6k stars 142 forks source link

Npm run start problems #129

Closed ricardodolnl closed 2 years ago

ricardodolnl commented 2 years ago

After installing Wordpressify I want to run npm run start and I get this error:

wordpressify-wp-nodejs-1           | 
wordpressify-wp-nodejs-1           | > wordpressify-wp@1.0.0 dev
wordpressify-wp-nodejs-1           | > gulp dev
wordpressify-wp-nodejs-1           | 
wordpressify-wp-wordpress-chmod-1 exited with code 0
wordpressify-wp-nodejs-1           | ReferenceError: require is not defined in ES module scope, you can use import instead
wordpressify-wp-nodejs-1           | This file is being treated as an ES module because it has a '.js' file extension and '/usr/src/app/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
wordpressify-wp-nodejs-1           |     at file:///usr/src/app/gulpfile.js:19:21
wordpressify-wp-nodejs-1           |     at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
wordpressify-wp-nodejs-1           |     at async Promise.all (index 0)
wordpressify-wp-nodejs-1           |     at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
wordpressify-wp-nodejs-1           |     at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
wordpressify-wp-nodejs-1 exited with code 1

But gulpfile.js does not use the require function. I use version 0.4.0-10

ricardodolnl commented 2 years ago

My bad, it works. I still had not deleted an older volume.