You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a package named devtools in packages/devtools and it has dependencies that includes things like babel-loader
{
"name": "devtools",
"dependencies": {
"babel-loader": "^8.2.3",
// etc.
Everything resolves ok in the packages workspace but in the apps workspace I have a package named website that references devtools from the other workspace.:
But when building through webpack, I get an error:
ModuleNotFoundError: Module not found: Error: Can't resolve 'babel-loader' in '/Users/xxx/projects/cuttingedge/apps/website'
THe only way to make this work is to either add all the dependencies from the devtools package.json to the website package.json or to add the missing dependencies to the main package.json
When there is only one work workspace, everything works as expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have more than one workspace defined in both my package.json file:
And in my
pnp-workspace.yaml
file:I have a package named devtools in
packages/devtools
and it hasdependencies
that includes things likebabel-loader
Everything resolves ok in the
packages
workspace but in theapps
workspace I have a package namedwebsite
that referencesdevtools
from the other workspace.:But when building through webpack, I get an error:
THe only way to make this work is to either add all the dependencies from the
devtools
package.json to thewebsite
package.json or to add the missing dependencies to the main package.jsonWhen there is only one work workspace, everything works as expected.
Beta Was this translation helpful? Give feedback.
All reactions