Hope you’re doing well! I’ve run into a bit of a snag while trying to fire up a Sage 10 project. Whenever I use “npm run start” or “yarn start” I get hit with this error
BudError
✘ Could not import @roots/bud-framework/env
I’ve got a feeling this is coming from the Bud Framework, but I’m not entirely sure how to tackle it. Just a heads up, my current Node.js version is 16.20.2.
Would love some guidance or insights if anyone has encountered this before. Thanks a bunch in advance!
I’ve been troubleshooting the issue, and when I run yarn bud upgrade, I encounter the following error:
$ yarn bud upgrade
yarn run v1.22.19
$ C:\Users\Musti\Desktop\Sites\pozhegubrothers\wp-content\themes\pozhegubrothers\node_modules\.bin\bud upgrade
node:internal/modules/esm/resolve:263
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\Musti\Desktop\Sites\pozhegubrothers\wp-content\themes\pozhegubrothers\node_modules\@roots\bud-framework\lib\methods\setPath\index.js' imported from C:\Users\Musti\Desktop\Sites\pozhegubrothers\wp-content\themes\pozhegubrothers\node_modules\@roots\bud-framework\lib\methods\index.js
at finalizeResolution (node:internal/modules/esm/resolve:263:11)
at moduleResolve (node:internal/modules/esm/resolve:908:10)
at defaultResolve (node:internal/modules/esm/resolve:1131:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///C:/Users/Musti/Desktop/Sites/pozhegubrothers/wp-content/themes/pozhegubrothers/node_modules/@roots/bud-framework/lib/methods/setPath/index.js'
}
Node.js v21.6.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I’ve also tried installing a fresh theme, but unfortunately, the issue persists. Additionally, when I run yarn build within the new theme, I get the following error:
$ yarn build
yarn run v1.22.19
$ bud build
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Your suggestion totally worked! Switched from Git Bash to the WSL terminal, followed your steps, and everything seems to be functioning smoothly now.
I’m encountering just one hiccup currently, which might not be directly related to the previous issue, but I’d love to get your insights. When I attempt to access the dev URL via localhost:3000, I’m getting this message:
Network
› Proxy ┄ http://pozhegubrothers.local/
› Dev ┄ http://localhost:3000/
┄ http://192.168.85.191:3000/
Press h to show help[server] › ✖ [HPM] Error occurred while proxying request localhost:3000/ to http://pozhegubrothers.local/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
[server] › ✖ [HPM] Error occurred while proxying request localhost:3000/favicon.ico to http://pozhegubrothers.local/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
[server] › ✖ [HPM] Error occurred while proxying request localhost:3000/ to http://pozhegubrothers.local/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
[server] › ✖ [HPM] Error occurred while proxying request localhost:3000/favicon.ico to http://pozhegubrothers.local/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
This is what I see in browser when accessing localhost:3000
Error occurred while trying to proxy: localhost:3000/
I don’t use WSL myself, but the error you’re now seeing suggests that the WSL machine can’t resolve the upstream webserver. I’m not sure what http stack you’re using, but you need to ensure that http://pozhegubrothers.local/ can be resolved from within the WSL machine.
It may just be a case of adding an /etc/hosts file entry to the WSL machine to point pozhegubrothers.local at the interface where your HTTP server is listening.
I’ve examined the /etc/hosts file in Ubuntu, and it appears that my MAMP domain is listed there. Unfortunately, I haven’t been able to resolve the issue yet, but I’ll continue my research.
Hi there, I’m having the same issue as above and have followed all that has been mentioned. I’ve tried doing a fresh install but come up against the issue still.