-
Notifications
You must be signed in to change notification settings - Fork 27.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can no longer build with 9.3.4
#11583
Comments
Please provide a full reproduction so that we can investigate. |
@timneutkens Thanks for your reply. Unfortunately, this is happening for me in a private repo that I can't share as-is. I'll try to put together a minimal, reproducible example - but it's going to take some effort. I was hoping some of you, more familiar with changes introduced in the latest patch release, would have a clue as to what may be causing this for users by acknowledging and digging up that particular error? Nothing comes to mind? |
Hi, I also have error after upgrading to 9.3.4
On version 9.3.3 everything works |
I do face the same problem with 9.3.4 but with different error message, see below.
^ This part precisely same as @howks @nfantone problem above |
Don't know why but
seems fix the thing. I successfully run |
I can confirm this is an issue. Wonder how this could get through CI / CD. This happens with |
I'm not sure why none of these comments provide a complete reproduction which makes it impossible for us to help you / investigate the issue. If you do provide a complete reproduction we can more easily tell you what the problem is. I'd be super happy to investigate deeper. |
Here are the release notes: https://github.com/zeit/next.js/releases/tag/v9.3.4 It's hard to say what exactly is the issue without having a complete reproduction as we can't investigate "run next build" as our integration test suite already covers "run next build" 50+ times in all kinds of situations. |
I understand your point - but seeing as there are now several of us facing the same problem, I'm not quite sure about this being "impossible to investigate". I can't talk for others, but at least in my case, I suppose it would mean a comparable amount of effort going through changes and see which one could be causing a
I can absolutely see how this is true and tests are appreciated - however, again, being that this is clearly not an isolated issue and is affecting users after migration, there are some common cases tests are evidently not be covering. Having said the above, I didn't mean to imply I won't share a reproducible example. I'm saying I don't have the time in my hands, right this moment, to set one up. In the meantime, I'm happy to answer further questions to help clarify this. |
https://github.com/andrewl913/next-9.3.4-reproduction here is a reproduction. Not tracking package.lock.json. Edit: Some further insight, this could related to the intergration with Apollo. |
@andrewl913 FWIW, I'm not using GraphQL at all. |
@andrewl913 Your repo is failing because it's missing a default export in
Fixing this issue, the app compiles as expected. |
@mattcarlotta @andrewl913 Then why would it work with |
@mattcarlotta thanks for picking up on that. I fixed that and pushed. Error still happens for me . Node version 12.14.0. npm version 6.13.6 Edit: I still reproduced the issue with out the custom document and app components. |
@nfantone if you have a chance, clone my repo and see if you still see the issue. |
@nfantone Your issue may be separate, but without a mwe, it's incredibly difficult and time consuming to track down what's causing your issue (a syntax error?, a third party dependency?, a problem with node?, a problem with your OS?) There are too many variables to consider without a reproducible example. @andrewl913 Not seeing any compilation issues with your updated repo (running Node v10.19.0/npm 6.13.4): |
This seems to work fine, we have tests cases for this (basic typescript) that run on both linux and windows environments |
@timneutkens @mattcarlotta @andrewl913 Didn't work for me. I didn't do anything besides cloning the repo, |
Many thanks for getting this up, @andrewl913. |
Tried using your version of |
@nfantone @timneutkens I was able to reproduce the problem when using Ubuntu 18.04 LTS Node v10.19.0/npm 6.13.4 Click to expand npm install example
yarn v.1.22.4 Click to expand yarn install example
|
@mattcarlotta Interesting. Can confirm it does work with |
@nfantone Try this with your private repo. Does the same issue occur? |
@mattcarlotta Indeed, it doesn't! Works fine with From what I've been gathering, there have been a lot of changes to Might some of them have anything to do with this? |
For me the problem also happens when using |
@nfantone Not that I can tell. All master/canary commits appear to be working when a local build is compiled/used in the example above. I'm leaning toward a possible npm registry issue? You can try for yourself: 1.) Download the v9.3.4 commit from the master branch 2.) Unzip to desktop 3.) Open a new terminal and type:
and wait for it to compile and exit. 4.) In the next-9.3.4-reproduction repo, add this to the package.json dependencies in replace of
5.) Open a new terminal and type
and it should compile the repo without having to use |
I am now having the same issue. All of a sudden when I went to run next dev I got this error TypeError: invalid options argument Everything was working fine then I went to add SVG support so I created a next.config.js and added svg support script for Webpack. Wen't to compile and that was it.... |
Here is what I did.... When installing next there was a warning : npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) It was about promises....hmmm ok.... It wanted me to upgrade to next9.3.4 to fix this when running npm audit. I tried to update the mkdirp package but got the same error on running next dev. I uninstall next and rolled back my next version to @9.3.1 next dev compiled... |
@timneutkens I believe I tracked down the issue to the Perhaps providing a Working example (use It appears, in andrew's case, that the |
@mattcarlotta I've been struggling with this issue as well. My repo, based on the firebase hosting example: https://github.com/NextJS-Firebase/nextjs-firebase-hosting-template |
I experience this as well. |
@mattcarlotta Good stuff. Adding an extra two cents here: in my case, it also installs npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) ❯ npm ls mkdirp
@my-project@1.0.0 /dev/my-project
├─┬ @next/bundle-analyzer@9.3.4
│ └─┬ webpack-bundle-analyzer@3.6.1
│ └── mkdirp@0.5.4
├─┬ admin-lte@3.0.4
│ └─┬ summernote@0.8.16
│ └─┬ npm-check-updates@4.1.1
│ └─┬ pacote@11.1.4
│ ├─┬ @npmcli/git@2.0.1
│ │ └── mkdirp@1.0.3 deduped
│ ├─┬ cacache@15.0.0
│ │ └── mkdirp@1.0.3 deduped
│ ├── mkdirp@1.0.3
│ └─┬ tar@6.0.1
│ └── mkdirp@1.0.3 deduped
├─┬ commitlint@8.3.5
│ └─┬ @commitlint/cli@8.3.5
│ └─┬ @commitlint/read@8.3.4
│ └─┬ @marionebl/sander@0.6.1
│ └── mkdirp@0.5.4
├─┬ eslint@6.8.0
│ ├─┬ file-entry-cache@5.0.1
│ │ └─┬ flat-cache@2.0.1
│ │ └─┬ write@1.0.3
│ │ └── mkdirp@0.5.4
│ └── mkdirp@0.5.4
└─┬ next@9.3.4
└─┬ webpack@4.42.0
├── mkdirp@0.5.4
├─┬ terser-webpack-plugin@1.4.3
│ └─┬ cacache@12.0.4
│ ├── mkdirp@0.5.4
│ └─┬ move-concurrently@1.0.1
│ ├─┬ copy-concurrently@1.0.5
│ │ └── mkdirp@0.5.4
│ └── mkdirp@0.5.4
└─┬ watchpack@1.6.1
└─┬ chokidar@2.1.8
└─┬ fsevents@1.2.12
└─┬ node-pre-gyp@0.14.0
├── mkdirp@0.5.3
└─┬ tar@4.4.13
└── mkdirp@0.5.3 deduped Seems like |
So far this seems to be a bug in npm module resolution (unrelated to Next.js) as the issue does not surface when using yarn 🤔 |
If yarn.lock and package-lock.json are published to the npm registry when a dependency like next is published. They are completely disregarded if you |
One thing that you could potentially do is this: #11583 (comment)
That would clean up your node_modules which could be in a bad state (because of that issue with the npm cli). |
I get where you're coming from and while it appears to be tied to
Apologies if I'm getting you wrong here, but if you're suggesting |
Please, correct me if I'm wrong here - but I don't believe that's the case. Lockfiles are always ignored on |
I think that the issue is not related to |
@focux Does adding mkdirp v0.5.4 ( |
That's what I meant. Reworded my comment a bit. |
Tried @mattcarlotta's suggestion which downgrades An alternative solution is using the latest |
Figured out what's going on, sending a PR to fix |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
After upgrading to
9.3.4
,next build
errors with: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:
Expected behavior
Project builds correctly.
System information
9.3.4
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.The text was updated successfully, but these errors were encountered: