Open osdiab opened 3 years ago
For my nextJS project I also had a few more missing declarations
"@fab/core@*":
dependencies:
json-keys-sort: "*"
"@fab/cli@*":
dependencies:
"@fab/actions": "*"
"@fab/actions@*":
dependencies:
pretty-bytes: "*"
and ultimately PNP seems to be breaking fab when running fab build:
Error Plugin: @fab/cli: could not find package.json with {
type: 'core',
root: '/Users/omar/code/personal/omardiab.com/.yarn/cache/@fab-cli-npm-1.0.0-rc.3-beta.1-058dd416eb-a0bb7e6833.zip/node_modules/@fab/cli',
name: '@oclif/plugin-help'
}
module: @oclif/config@1.17.0
task: loadPlugins
plugin: @fab/cli
root: /Users/omar/code/personal/omardiab.com/.yarn/cache/@fab-cli-npm-1.0.0-rc.3-beta.1-058dd416eb-a0bb7e6833.zip/node_modules/@fab/cli
See more details with DEBUG=*
(Use `node --trace-warnings ...` to show where the warning was created)
[Builder] 💎 fab build 💎
[Builder] Reading plugins from config.
Build failed!
Error occurred requiring /Users/omar/code/personal/omardiab.com/.yarn/cache/@fab-input-nextjs-npm-1.0.0-rc.3-beta.1-c0001e227b-c309455394.zip/node_modules/@fab/input-nextjs/build.js.
Maybe it's using syntax that NodeJS can't interpret?
See https://fab.dev/kb/plugins#restrictions for more info.
Error: Build failed!
Looks like yarn berry
support isn't quite there yet lol
Issue
yarn
berry project by runningyarn add -D @fab/cli
(I did this sincenpx fab init
fails as well if I just run it like that)yarn fab init
to init the project@fab/core
:Solution
Add the dep explicitly to
@fab/core
Workaround
Add this to
yarnrc.yml
: