shadowwalker / next-pwa

Zero config PWA plugin for Next.js, with workbox 🧰
MIT License
3.71k stars 312 forks source link

build next@13.2.4 using pnpm. i got error like this... #477

Open Shani-Sinojiya opened 1 year ago

Shani-Sinojiya commented 1 year ago

please, help me in pnpm.

Module 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.

Originally posted by @Shani-Sinojiya in https://github.com/shadowwalker/next-pwa/issues/222#issuecomment-1537122320

pronovaso commented 1 year ago

And when you install babel-loader as dependeci manualy? It seems like NextJS remove from core.

Shani-Sinojiya commented 1 year ago

yes, i have downloaded babel-loader dependence.

Shani-Sinojiya commented 1 year ago

if i add _offline.tsx, i have faced that error at that time.

elrumordelaluz commented 7 months ago

On my side this issue is solved removing _offline.js file.

Shani-Sinojiya commented 7 months ago

I want _offline.tsx file

eddiejaoude commented 7 months ago

I get the same issue when adding the _offline.js file also - it works locally but not when building on Vercel

Note the temporary solutions did not fix it for me

Shani-Sinojiya commented 6 months ago

I get the same issue when adding the _offline.js file also - it works locally but not when building on Vercel

Note the temporary solutions did not fix it for me

  • updating .npmrc
  • installing babel-loader

What should i do on host in vercel?