next-pwa icon indicating copy to clipboard operation
next-pwa copied to clipboard

Is next-pwa is deprecated?

Open satyamskillz opened this issue 4 years ago • 3 comments

Summary

Recently, I noticed that NextJS 11 is shifted to Webpack 5 and JEST is renamed to JOI. when I am running my application production or development is don't see next-PWA generating any files. and I got these warnings during installation.

warning next > native-url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning next > node-libs-browser > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning next-pwa > workbox-webpack-plugin > workbox-build > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/[email protected]: Switch to 'npm install joi'
warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained        
warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained        
warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained      
warning next-pwa > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@>=4.0.0".
warning "next-pwa > [email protected]" has unmet peer dependency "webpack@*".
warning "next-pwa > [email protected]" has unmet peer dependency "webpack@^4.0.0".

When I tried to run the old Nextjs example from here link I got these warnings. what is happing?

(node:11604) [DEP_WEBPACK_SINGLE_ENTRY_PLUGIN] DeprecationWarning: SingleEntryPlugin was renamed to EntryPlugin
(Use `node --trace-deprecation ...` to show where the warning was created)
> [PWA] Compile client (static)
> [PWA] Build in develop mode, cache and precache are mostly disabled. This means offline support is disabled, but you can continue developing other functions in service worker.
> [PWA] Auto register service worker with: D:\NEXT-JS\progressive-web-app\node_modules\next-pwa\register.js
> [PWA] Service worker: D:\NEXT-JS\progressive-web-app\public\sw.js
> [PWA]   url: /sw.js
> [PWA]   scope: /
> [PWA] Compile server
@rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
(node:11604) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
        Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
        Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.

Versions

  • next-pwa: ^5.2.24
  • next: ^11.0.1

satyamskillz avatar Jul 21 '21 08:07 satyamskillz

  1. What make you think next-pwa is deprecated?
  2. What make you think "JEST is renamed to JOI"?
  3. I don't maintain the example inside next.js repository unfortunately, does the examples in this repository not good enough for you?

shadowwalker avatar Jul 25 '21 05:07 shadowwalker

  1. What this line means (node:11604) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated?
  2. warning next-pwa > workbox-webpack-plugin > workbox-build > @hapi/[email protected]: Switch to 'npm install joi'.
  3. Yes, I understand that most of the next.js examples are outdated, after this recent version update most of the examples are giving deprecation warning. my application is totally dependent on pwa, that's why I don't want to use any packages such as next-pwa and next-sitemap which might cause problems in future.

satyamskillz avatar Jul 25 '21 09:07 satyamskillz

I have installed this plugin and when this plugin is uninstalled, Vercel returns 500 internal server error.

This seems to be messing with package-lock.json (babel/core), hope this can be a hint of a fix.

I was stuck in the same problem, finally solved. Remove target: 'serverless' in next.config.js. Ref: https://github.com/vercel/next.js/issues/10633

renomureza avatar Aug 01 '21 06:08 renomureza