Open rtritto opened 3 years ago
This was super confusing for me as a new user to next
and yarn
. Thanks for the workaround. It would be nice to see this fixed.
This is still an issue:
➤ YN0000: ┌ Resolution step
➤ YN0002: │ next-pwa@npm:5.6.0 [09d8e] doesn't provide @babel/core (pf3fbe), requested by babel-loader
➤ YN0002: │ next-pwa@npm:5.6.0 [e2932] doesn't provide @babel/core (p6251e), requested by babel-loader
I was also getting same warnings, but workaround resolved the issue at my end: screenshot
Thanks for the workaround. It would be nice to see this fixed.
next-pwa
: "^5.6.0"next
: "13.1.2"please, help me in pnpm.
next
: 13.2.4next-pwa
: 5.6.0Module not found: Error: Can't resolve 'babel-loader' in 'D:\project'
resolve 'babel-loader' in 'D:\project'
Parsed request is a module
using description file: D:\project\package.json (relative path: .)
resolve as module
looking for modules in D:\project\node_modules
single file module
using description file: D:\project\package.json (relative path: ./node_modules/babel-loader)
no extension
D:\project\node_modules\babel-loader doesn't exist
.js
D:\project\node_modules\babel-loader.js doesn't exist
D:\project\node_modules\babel-loader doesn't exist
D:\node_modules doesn't exist or is not a directory
webpack 5.74.0 compiled with 1 error in 1193 ms
info - Creating an optimized production build. ELIFECYCLE Command failed with exit code 4294967295.
for me adding public-hoist-pattern[]=!@babel*
to the .npmrc
fixed it
Summary
After I install
next-pwa
with yarn, I get dependency not found warnings in yarn log.Respectively peerDeependencies:
webpack
is ofbabel-loader
,clean-webpack-plugin
,terser-webpack-plugin
andworkbox-webpack-plugin
dependencies; it should be moved from peerDependencies to dependencies@babel/core
is ofbabel-loader
; it should be added in dependenciesVersions
next
: 11.1.2next-pwa
: 5.4.0How To Reproduce
Steps to reproduce the behavior:
yarn init -y
yarn set version berry
yarn add next next-pwa react react-dom
Results
Actual
yarn log:
Expect
No warning in yarn log.
Workaround
Add in
.yarnrc.yml
: