Can no longer build with `9.3.4`
See original GitHub issueBug report
Describe the bug
After upgrading to 9.3.4
, next build
errors with:
❯ npm run build
> my-project@1.0.0 build /dev/my-project
> cross-env NEXT_TELEMETRY_DISABLED=1 next build
Creating an optimized production build
Failed to compile.
./node_modules/next/dist/client/next.js
TypeError: invalid options argument
at new Promise (<anonymous>)
at Generator.throw (<anonymous>)
> Build error occurred
Error: > Build failed because of webpack errors
at build (/dev/my-project/node_modules/next/dist/build/index.js:13:900)
I noticed that, for some reason, the actual line in which the error is thrown varies between runs of next build
, seemingly at random. However, the error message is always the same.
For example:
Failed to compile.
./node_modules/next/dist/client/polyfills.js
TypeError: invalid options argument
Failed to compile.
./node_modules/next/dist/client/router.js
TypeError: invalid options argument
Expected behavior
Project builds correctly.
System information
- OS: macOS Catalina 10.15.4 (19E266)
- Version of Next.js:
9.3.4
- Version of node:
v12.16.1
Additional context
No other modifications were done or applied. All other dependencies remain the same in lockfile.
Reverting back to 9.3.3
solves the issue for me.
❯ npm remove next && npm i next@9.3.3
+ next@9.3.3
added 656 packages from 270 contributors and audited 1063442 packages in 27.174s
77 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
❯ npm run build
> my-project@1.0.0 build /dev/my-project
> cross-env NEXT_TELEMETRY_DISABLED=1 next build
Creating an optimized production build
Compiled successfully.
Automatically optimizing pages
# ...
Issue Analytics
- State:
- Created 3 years ago
- Reactions:17
- Comments:43 (18 by maintainers)
Top Results From Across the Web
iPad update from 9.3.2 to 9.3.4 - Apple Community
I tried updating and restoring, but was told this build could not be installed ... An exception would be if the device no...
Read more >drupal 9.3.4
Learn more about Drupal 9. Drupal 9.3.x will receive security coverage until December 2022. If you are upgrading from Drupal 8, ...
Read more >NO iOS 9.3.4 Update & Remove Cydia! (NO COMPUTER)
iOS 9.3.3 Remove Jailbreak WITHOUT Updating iOS 9.3.4 ! How to UnJailbreak 9.3.3 & Remove ... Your browser can ' t play this...
Read more >Cisco Nexus 9000 Series NX-OS Release Notes, Release 9.3(4)
Symptoms: Some N9K-C9332C ports can't come up while using QSA with 10G-LR. Transceiver could receive light, but interface is down. Workarounds: ...
Read more >iOS 9.3.4 Released as Important Security Update [IPSW ...
Additionally some users trying to install iOS 9.3.4 may encounter an “This Device isn't Eligible for the Requested Build” error message, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timneutkens I believe I tracked down the issue to the
mkdirp
dependency. Specifically, how npm’s registry resolves themkdirp
dependency to this repo, while the yarn registry resolvesmkdirp
dependency to this repo. Swapping out the npm registry version (v1.0.3) for the yarn locked registry version (v0.5.4) seems to have fixed the issue.Perhaps providing a
package.lock.json
in addition to theyarn.lock
may solve this problem or perhaps addingmkdirp@0.5.4
to next’s package.jsondevDependencies
. Let me know how you wish to proceed. I can create a pull request if needed.Working example (use
npm i
oryarn
, both should compile without errors): https://github.com/mattcarlotta/next-9.3.4-reproductionIt appears, in andrew’s case, that the
apollo
package requiresmkdir: "^1.0.3"
, while every other package, requiresmkdirp "^0.5.0"
:I do face the same problem with 9.3.4 but with different error message, see below. Version 9.3.3 do me just fine.
^ This part precisely same as @howks @nfantone problem above