Closed dsuriano closed 5 years ago
Where did you get these errors and can you copy them here? Those modules are dependencies of other dependencies in package.json
and should be installed automatically by npm
when installing these.
After running npm install fabrica-dev-kit -g
and creating my project directory:
fdk init
fdk setup
The build process is successful until the WordPress theme builds, then:
[Fabrica] 🕑 Waiting for 'fabrica_wp' container...
[Fabrica] 🏭 Web server running at port 32769
[Fabrica] 🏭 Installing WordPress...
Success: WordPress installed successfully.
Success: Rewrite rules flushed.
Success: Rewrite structure set.
[Fabrica] 🏭 Building WordPress theme...
module.js:338
throw err;
^
Error: Cannot find module 'postcss-reporter'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/Sites/fabrica/gulpfile.js:24:20)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
[Fabrica] ⚠️ Gulp 'build' task failed
npm install postcss-reporter
fdk setup --reinstall
Next error:
[Fabrica] 🕐 Waiting for 'fabrica_wp' container...
[Fabrica] 🏭 Web server running at port 32769
[Fabrica] 🏭 Installing WordPress...
WordPress is already installed.
Success: Rewrite rules flushed.
Success: Rewrite structure set.
[Fabrica] 🏭 Building WordPress theme...
module.js:338
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/Sites/fabrica/gulpfile.js:32:12)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
[Fabrica] ⚠️ Gulp 'build' task failed
npm install webpack
fdk setup --reinstall
Next error:
[Fabrica] 🕐 Waiting for 'fabrica_wp' container...
[Fabrica] 🏭 Web server running at port 32769
[Fabrica] 🏭 Installing WordPress...
WordPress is already installed.
Success: Rewrite rules flushed.
Success: Rewrite structure set.
[Fabrica] 🏭 Building WordPress theme...
module.js:338
throw err;
^
Error: Cannot find module 'js-yaml'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/Sites/fabrica/gulpfile.js:33:9)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
[Fabrica] ⚠️ Gulp 'build' task failed
npm install js-yaml
fdk setup --reinstall
At this point, the build is successful and the script completes. I can run gulp
and everything works.
If I add the 3 missing dependencies above to /usr/local/lib/node_modules/fabrica-dev-kit/dev/package.json
(macOS), the next time I setup a new project using fdk init
then fdk setup
, everything installs successfully.
Hello everyone!
I think this issue can closed. What do you think?
Closing this. If this happens again please let us know.
When running
fdk setup
, the build process errors out on missing dependencies:postcss-reporter
webpack
js-yaml
Either manually installing them into a project, or globally adding them into
/dev/package.json
seems to fix the errors.