Fatal error: The manifest cannot be found

I have followed all the instructions in the docs and cant seem to get Sage working, When I run my final yarn build I also get an error

The manifest cannot be found error is related to not yet having run yarn build.

So you will need to do that first, but what error are you getting when you try to yarn build?

1 Like

I Get this in my terminal

ModuleNotFoundError: Module not found: Error: Can’t resolve '//app/public/wp-content/themes/sage/node_modules/babel-loader/lib/index.js

Is there any comprehensive set up guides, I cant seem to make sense of the official documentation at all.

Just the getting started here in the docs.

It sounds like you might not have run yarn or more specifically yarn install (this is the default command when none is supplied)

1 Like

Cheers @EHLOVader,

These are the errors I get, I have tried yarn & yarn install on the theme folder and nothing changes

Fatal error: Uncaught Roots\Acorn\Assets\Contracts\ManifestNotFoundException: The manifest [Local Sites/test/app/public/wp-content/themes/your-theme-name/public/manifest.json] cannot be found. in Local Sites/test/app/public/wp-content/themes/your-theme-name/vendor/roots/acorn/src/Roots/Acorn/Assets/Manager.php on line 133

( ! ) Roots\Acorn\Assets\Contracts\ManifestNotFoundException: The manifest [Local Sites/test/app/public/wp-content/themes/your-theme-name/public/manifest.json] cannot be found. in Local Sites/test/app/public/wp-content/themes/your-theme-name/vendor/roots/acorn/src/Roots/Acorn/Assets/Manager.php on line 133

I get the following in terminal when I run yarn build

bud@6.3.3] [bud] › :heavy_multiplication_x: ModuleNotFoundError: Module not found: Error: Can’t resolve ‘/Users/joeywright/Local%20Sites/test/app/public/wp-content/themes/sage/node_modules/babel-loader/lib/index.js’ in ‘/Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage’
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/webpack/lib/Compilation.js:2016:28
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/webpack/lib/NormalModuleFactory.js:798:13
at eval (eval at create (/Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/webpack/lib/NormalModuleFactory.js:270:22
at eval (eval at create (/Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/webpack/lib/NormalModuleFactory.js:541:15
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/webpack/lib/NormalModuleFactory.js:116:11
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/webpack/lib/NormalModuleFactory.js:612:8
at /Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/neo-async/async.js:2830:7
at done (/Users/joeywright/Local Sites/test/app/public/wp-content/themes/sage/node_modules/neo-async/async.js:2925:13)

Those errors are from PHP, so not relevant yet for this.
edit: although they are different now, so maybe progress.

The errors you get from build still appear to be that there are modules missing. On a clean sage theme I don’t have any trouble, were you using the release version or the latest development one?

What do you get when you run yarn install in the theme? You say it changes nothing but what is the output?

1 Like

Hi @EHLOVader thanks for your help with this so far! I will explain what happens on a clean install below:

  • I run $composer create-project roots/sage test in wp-content/themes
  • I then install acorn onto the theme in wp-content/themes/sage using composer require roots/acorn

In WP Admin I then Active the “Sage Starter Theme”

I change the following lines in bud.config.mjs

/**
     * Proxy origin (`WP_HOME`)
     */
    .proxy("http://test.local/")

    /**
     * Development origin
     */
    .serve("http://0.0.0.0:10009")

I then have the PHP Errors previously mentioned when I try & load the frontend of the website. The backend works,

I then run yarn & yarn build on the theme folder and nothing changes on the front end, Its my understanding that I should be seeing a barebones WP theme at that point?

Here is the output from a yarn install

 Resolution step
➤ YN0002: │ @roots/bud-api@npm:6.3.3 doesn't provide webpack (paa976), requested by copy-webpack-plugin
➤ YN0002: │ @roots/bud-api@npm:6.3.3 doesn't provide webpack (p30a8d), requested by html-webpack-plugin
➤ YN0002: │ @roots/bud-babel@npm:6.3.3 [5752c] doesn't provide webpack (p46568), requested by babel-loader
➤ YN0002: │ @roots/bud-build@npm:6.3.3 doesn't provide webpack (p22f41), requested by css-loader
➤ YN0002: │ @roots/bud-build@npm:6.3.3 doesn't provide webpack (p6c0d3), requested by file-loader
➤ YN0002: │ @roots/bud-build@npm:6.3.3 doesn't provide webpack (p54614), requested by html-loader
➤ YN0002: │ @roots/bud-build@npm:6.3.3 doesn't provide webpack (p3c7bd), requested by mini-css-extract-plugin
➤ YN0002: │ @roots/bud-build@npm:6.3.3 doesn't provide webpack (p850ee), requested by remark-loader
➤ YN0002: │ @roots/bud-build@npm:6.3.3 doesn't provide webpack (p06a66), requested by style-loader
➤ YN0002: │ @roots/bud-entrypoints@npm:6.3.3 doesn't provide webpack (pcc220), requested by @roots/entrypoints-webpack-plugin
➤ YN0002: │ @roots/bud-postcss@npm:6.3.3 [aab87] doesn't provide webpack (pb6459), requested by postcss-loader
➤ YN0002: │ @roots/bud-react@npm:6.3.3 [5752c] doesn't provide @babel/core (ped387), requested by @babel/preset-react
➤ YN0002: │ @roots/bud-react@npm:6.3.3 [5752c] doesn't provide webpack (p55009), requested by @pmmmwh/react-refresh-webpack-plugin
➤ YN0002: │ @roots/bud-server@npm:6.3.3 doesn't provide webpack (pe28cf), requested by webpack-dev-middleware
➤ YN0002: │ @roots/bud-terser@npm:6.3.3 doesn't provide webpack (p7a0d3), requested by css-minimizer-webpack-plugin
➤ YN0002: │ @roots/bud-terser@npm:6.3.3 doesn't provide webpack (p28559), requested by terser-webpack-plugin
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 423ms

Im using the release version

Bud 6.3.5 fixes an issue with spaces in directory names

Try getting setup in a directory without spaces, such as “Sites” instead of “Local Sites”, and/or upgrade your Bud dependencies

Cheers @ben this is the default directory used by Local, I have tried MAMP “htdocs” & have the same issue.

I get the same output when I run yarn install.

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @roots/bud-babel@npm:6.4.5 [ad0d8] doesn't provide webpack (pf4f58), requested by babel-loader
➤ YN0002: │ @roots/bud-build@npm:6.6.2 doesn't provide webpack (pe1106), requested by css-loader
➤ YN0002: │ @roots/bud-build@npm:6.6.2 doesn't provide webpack (p34ab2), requested by file-loader
➤ YN0002: │ @roots/bud-build@npm:6.6.2 doesn't provide webpack (p77c6d), requested by html-loader
➤ YN0002: │ @roots/bud-build@npm:6.6.2 doesn't provide webpack (pe0f5e), requested by mini-css-extract-plugin
➤ YN0002: │ @roots/bud-build@npm:6.6.2 doesn't provide webpack (pb768c), requested by remark-loader
➤ YN0002: │ @roots/bud-build@npm:6.6.2 doesn't provide webpack (pd72a5), requested by style-loader
➤ YN0002: │ @roots/bud-entrypoints@npm:6.4.5 doesn't provide webpack (p1b5dc), requested by @roots/entrypoints-webpack-plugin
➤ YN0002: │ @roots/bud-extensions@npm:6.6.2 [5acc9] doesn't provide webpack (p60d2c), requested by mini-css-extract-plugin
➤ YN0002: │ @roots/bud-extensions@npm:6.6.2 [5acc9] doesn't provide webpack (pad0b1), requested by clean-webpack-plugin
➤ YN0002: │ @roots/bud-extensions@npm:6.6.2 [5acc9] doesn't provide webpack (p98ba4), requested by copy-webpack-plugin
➤ YN0002: │ @roots/bud-extensions@npm:6.6.2 [5acc9] doesn't provide webpack (p73d21), requested by html-webpack-plugin
➤ YN0002: │ @roots/bud-extensions@npm:6.6.2 [5acc9] doesn't provide webpack (p8cfbf), requested by webpack-manifest-plugin
➤ YN0002: │ @roots/bud-postcss@npm:6.4.5 [7d862] doesn't provide webpack (p572c9), requested by postcss-loader
➤ YN0002: │ @roots/bud-react@npm:6.4.5 [ad0d8] doesn't provide @babel/core (pe8255), requested by @babel/preset-react
➤ YN0002: │ @roots/bud-react@npm:6.4.5 [ad0d8] doesn't provide webpack (pe12ec), requested by @pmmmwh/react-refresh-webpack-plugin
➤ YN0002: │ @roots/bud-server@npm:6.6.2 [5acc9] doesn't provide webpack (p8a292), requested by webpack-dev-middleware
➤ YN0002: │ @roots/bud-tailwindcss@npm:6.4.5 [ed0cd] doesn't provide postcss (p879b1), requested by autoprefixer
➤ YN0002: │ @roots/bud-terser@npm:6.6.2 doesn't provide webpack (p92cae), requested by css-minimizer-webpack-plugin
➤ YN0002: │ @roots/bud-terser@npm:6.6.2 doesn't provide webpack (p6470e), requested by terser-webpack-plugin
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 245ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 443ms
➤ YN0000: Done with warnings in 0s 939ms

When I run yarn dev I get the following error in the browser.

Error occurred while trying to proxy: localhost:3000/

I installed the release version of sage in a Trellis environment. Does anyone know a solution to this problem?

What node; npm (for installing yarn v1 “Classic”) and yarn version are you using?

(nvm for managing node versions (also Windows edition for non-Linux/-WSL usage)).

I tested this in WSL 2 (Ubuntu LTS):

(cd ~/src)

composer create-project roots/sage

nvm install lts/*
nvm use lts/*
# Install + use current node LTS

npm install -g npm
# Self update npm which helps with install issues.
npm install -g yarn
# Install latest yarn v1 "Classic"

yarn install
# Installation completes. I get some dependency warnings.

yarn build
# build completes. I get a browserlist update message, which should be fine.

npx browserslist@latest --update-db
# update browserlist/caniuse db

yarn build
# build still works after updating browserlist/caniuse db
1 Like

I have installed the versions below on a MacBook Pro with macOS Monterey (Version 12.6.1).

nvm --version
# => 0.39.2
npm --version
# => 8.19.2
yarn --version
# => 3.3.0
node --version
# =>  v18.12.1
which node
# => /Users/e64740/.volta/bin/node
php --version
# => 8.1.12

I also followed your steps, but I still get the same errors after yarn install. A few days ago it worked and now I keep getting these error messages. I’ve been working on it all day now.

Some other things to try:

  • Completely purge the node_modules folder and install and build again (yarn install && yarn build).
  • Re-install the node version in use (nvm use system && nvm uninstall v18.12.1 && nvm install v18.12.1 && nvm use v18.12.1 && npm install -g npm && npm install -g yarn), then try again with yarn install && yarn build.
  • Try to install the dependencies using npm instead of yarn ((Purge node_modules, then invoke npm install && npm run build), does this work instead?
1 Like

Thank you for your help. I really appreciate it when someone makes the effort to help you! :+1:t3:

Your first option helped me. The error messages disappeared. Thank you! :slightly_smiling_face: That I haven’t thought of that before.

Unfortunately, I am now again dealing with a new error message in the browser.

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.25. in /srv/www/matters.test/current/vendor/composer/platform_check.php on line 24

First I’m going to do some research on this problem. If I can’t figure it out, I’ll post it under the Trellis category.

Just change the version number (81000) in /srv/www/matters.test/current/vendor/composer/platform_check.php to a lower value and avoid the version check. I had to do the same for all sites I’m running.

Whoa. That hack that should maybe used very briefly if absolutely necessary… I’m 100% against anyone advising someone on here to directly modify files in the vendor directory to get their setup working.

The error message is very clear:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.1.0”. You are running 8.0.25.

Use PHP 8.1, or stop trying to do a composer install from a lockfile that was generated from PHP 8.1.

4 Likes