I have played Phoenix for a month, and everything has been fine until today. Today morning, it went wrong.
When I generate a new Phoenix app(called 'islands_interface') following official tutorial and other tutorials;
$ mix phx.new islands_interface
$ cd islands_interface && cd assets && npm install && node node_modules/webpack/bin/webpack.js --mode development
The terminal show a long error message starting;
Module build failed: Error: Package exports for '/Users/Jupeter/islands_interface/assets/node_modules/@babel/helper-compilation-targets' do not define a '.' subpath
...
When I connect to http://localhost:4000/, it shows the default welcome page, but when opening my Chrome browser console, it also shows a long error messages starting;
GET http://localhost:4000/css/app.css net::ERR_ABORTED 404 (Not Found)
app.js:1 Uncaught Error: Module build failed: Error: Package exports for '/Users/Jupeter/islands_interface/assets/node_modules/@babel/helper-compilation-targets' do not define a '.' subpath
at applyExports (:4000/internal/modules/cjs/loader.js:485)
at resolveExports (:4000/internal/modules/cjs/loader.js:508)
at Function.
...
The error seems something related to npm and webpack, but don't know how to fix it. I have tried several times to make a brand new Phoenix app, but all show the same error messages. That is, the Phoenix doesn't work anymore even after reinstalling it.
$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.4.0
Thank you.