630c41cd92
### What? First phase implementation for WEB-1313. This PR expands existing `next info` features by adding new flag `--run-diags`. When this flag is supplied, next.js will try to collect more information. Primarily informations are related to next-swc installation to see if it's possible to diagnose why next-swc cannot be loaded on certain systems. It is not a definitive list - depends on the findings we may increase more items to collect. These are the list of status included in the output - Host info: CI / WSL / Docker - Next.js installation: node, pkg mger version, next.js pkg - Partial Node.js diagnostics report: `header, javascriptHeap, sharedObjects` - next-swc installation: check if installed next-swc can be loaded - (Mac os only) next-swc shared object dependencies: using `otool` or `dyld_info` to collect binary dependencies. Linux / Windows support will follow later. Below's an example generated report, expect user to attach into issue if there are failures. <details> ``` ### Host system information WSL: false Docker: false CI: false ### Next.js installation Binaries: Node: 18.11.0 npm: 8.19.2 Yarn: N/A pnpm: 7.24.3 Relevant Packages: next: 13.4.13-canary.1 eslint-config-next: 13.4.13-canary.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A ### Node.js diagnostic report { "header": { "reportVersion": 2, "event": "JavaScript API", "trigger": "GetReport", "filename": null, "dumpEventTime": "2023-07-25T14:13:32Z", "dumpEventTimeStamp": "1690319612854", "processId": 33203, "threadId": 0, "nodejsVersion": "v18.11.0", "wordSize": 64, "arch": "arm64", "platform": "darwin", "componentVersions": { "node": "18.11.0", "v8": "10.2.154.15-node.12", "uv": "1.43.0", "zlib": "1.2.11", "brotli": "1.0.9", "ares": "1.18.1", "modules": "108", "nghttp2": "1.47.0", "napi": "8", "llhttp": "6.0.10", "openssl": "3.0.5+quic", "cldr": "41.0", "icu": "71.1", "tz": "2022b", "unicode": "14.0", "ngtcp2": "0.8.1", "nghttp3": "0.7.0" }, "release": { "name": "node", "headersUrl": "https://nodejs.org/download/release/v18.11.0/node-v18.11.0-headers.tar.gz", "sourceUrl": "https://nodejs.org/download/release/v18.11.0/node-v18.11.0.tar.gz" }, "osName": "Darwin", "osRelease": "22.5.0", "osVersion": "Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000", "osMachine": "arm64" }, "javascriptHeap": { "totalMemory": 25624576, "executableMemory": 1048576, "totalCommittedMemory": 23543808, "availableMemory": 4324923368, "totalGlobalHandlesMemory": 16384, "usedGlobalHandlesMemory": 8384, "usedMemory": 20296720, "memoryLimit": 4345298944, "mallocedMemory": 1431256, "externalMemory": 1450294, "peakMallocedMemory": 6525792, "nativeContextCount": 1, "detachedContextCount": 0, "doesZapGarbage": 0, "heapSpaces": { "read_only_space": { "memorySize": 0, "committedMemory": 0, "capacity": 0, "used": 0, "available": 0 }, "old_space": { "memorySize": 8994816, "committedMemory": 9175040, "capacity": 8830992, "used": 8829704, "available": 1288 }, "code_space": { "memorySize": 966656, "committedMemory": 917504, "capacity": 765440, "used": 762496, "available": 2944 }, "map_space": { "memorySize": 802816, "committedMemory": 1048576, "capacity": 773376, "used": 773264, "available": 112 }, "large_object_space": { "memorySize": 6094848, "committedMemory": 6094848, "capacity": 6056016, "used": 6056016, "available": 0 }, "code_large_object_space": { "memorySize": 0, "committedMemory": 0, "capacity": 0, "used": 0, "available": 0 }, "new_large_object_space": { "memorySize": 376832, "committedMemory": 376832, "capacity": 4995992, "used": 351088, "available": 4644904 }, "new_space": { "memorySize": 8388608, "committedMemory": 5931008, "capacity": 4123904, "used": 3524152, "available": 599752 } } }, "sharedObjects": [ "/Users/ojkwon/Library/Application Support/fnm/node-versions/v18.11.0/installation/bin/node", "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", "/usr/lib/libobjc.A.dylib", "/System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal", "/usr/lib/liboah.dylib", "/usr/lib/libfakelink.dylib", "/usr/lib/libicucore.A.dylib", "/usr/lib/libSystem.B.dylib", "/System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking", "/usr/lib/libc++abi.dylib", "/usr/lib/libc++.1.dylib", "/usr/lib/system/libcache.dylib", "/usr/lib/system/libcommonCrypto.dylib", "/usr/lib/system/libcompiler_rt.dylib", "/usr/lib/system/libcopyfile.dylib", "/usr/lib/system/libcorecrypto.dylib", "/usr/lib/system/libdispatch.dylib", "/usr/lib/system/libdyld.dylib", "/usr/lib/system/libkeymgr.dylib", "/usr/lib/system/libmacho.dylib", "/usr/lib/system/libquarantine.dylib", "/usr/lib/system/libremovefile.dylib", "/usr/lib/system/libsystem_asl.dylib", "/usr/lib/system/libsystem_blocks.dylib", "/usr/lib/system/libsystem_c.dylib", "/usr/lib/system/libsystem_collections.dylib", "/usr/lib/system/libsystem_configuration.dylib", "/usr/lib/system/libsystem_containermanager.dylib", "/usr/lib/system/libsystem_coreservices.dylib", "/usr/lib/system/libsystem_darwin.dylib", "/usr/lib/system/libsystem_dnssd.dylib", "/usr/lib/system/libsystem_featureflags.dylib", "/usr/lib/system/libsystem_info.dylib", "/usr/lib/system/libsystem_m.dylib", "/usr/lib/system/libsystem_malloc.dylib", "/usr/lib/system/libsystem_networkextension.dylib", "/usr/lib/system/libsystem_notify.dylib", "/usr/lib/system/libsystem_sandbox.dylib", "/usr/lib/system/libsystem_secinit.dylib", "/usr/lib/system/libsystem_kernel.dylib", "/usr/lib/system/libsystem_platform.dylib", "/usr/lib/system/libsystem_pthread.dylib", "/usr/lib/system/libsystem_symptoms.dylib", "/usr/lib/system/libsystem_trace.dylib", "/usr/lib/system/libunwind.dylib", "/usr/lib/system/libxpc.dylib", "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit", "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices", "/usr/lib/libDiagnosticMessagesClient.dylib", "/usr/lib/libenergytrace.dylib", "/usr/lib/libbsm.0.dylib", "/usr/lib/libz.1.dylib", "/usr/lib/system/libkxld.dylib", "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices", "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList", "/System/Library/Frameworks/Security.framework/Versions/A/Security", "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration", "/usr/lib/libapple_nghttp2.dylib", "/usr/lib/libcompression.dylib", "/usr/lib/libnetwork.dylib", "/usr/lib/libsqlite3.dylib", "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation", "/System/Library/Frameworks/Network.framework/Versions/A/Network", "/usr/lib/libCoreEntitlements.dylib", "/System/Library/PrivateFrameworks/MessageSecurity.framework/Versions/A/MessageSecurity", "/System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer", "/usr/lib/libMobileGestalt.dylib", "/System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression", "/usr/lib/libcoretls.dylib", "/usr/lib/libcoretls_cfhelpers.dylib", "/usr/lib/libpam.2.dylib", "/usr/lib/libxar.1.dylib", "/System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout", "/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration", "/usr/lib/libarchive.2.dylib", "/usr/lib/libxml2.2.dylib", "/usr/lib/liblangid.dylib", "/System/Library/Frameworks/Combine.framework/Versions/A/Combine", "/usr/lib/swift/libswiftCore.dylib", "/usr/lib/swift/libswiftCoreFoundation.dylib", "/usr/lib/swift/libswiftDarwin.dylib", "/usr/lib/swift/libswiftDispatch.dylib", "/usr/lib/swift/libswiftIOKit.dylib", "/usr/lib/swift/libswiftObjectiveC.dylib", "/usr/lib/swift/libswiftXPC.dylib", "/usr/lib/swift/libswift_Concurrency.dylib", "/usr/lib/swift/libswift_StringProcessing.dylib", "/usr/lib/swift/libswiftos.dylib", "/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo", "/System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/Versions/A/IOMobileFramebuffer", "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface", "/usr/lib/libpcap.A.dylib", "/usr/lib/libdns_services.dylib", "/usr/lib/liblzma.5.dylib", "/usr/lib/libbz2.1.0.dylib", "/usr/lib/libiconv.2.dylib", "/usr/lib/libcharset.1.dylib", "/usr/lib/swift/libswift_RegexParser.dylib", "/usr/lib/libheimdal-asn1.dylib", "/usr/lib/libCheckFix.dylib", "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC", "/System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP", "/System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate", "/usr/lib/libmecab.dylib", "/usr/lib/libCRFSuite.dylib", "/usr/lib/libgermantok.dylib", "/usr/lib/libThaiTokenizer.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib", "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib", "/System/Library/PrivateFrameworks/MIL.framework/Versions/A/MIL", "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory", "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory", "/System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS", "/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation", "/usr/lib/libutil.dylib", "/System/Library/PrivateFrameworks/InstalledContentLibrary.framework/Versions/A/InstalledContentLibrary", "/System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore", "/usr/lib/libapp_launch_measurement.dylib", "/System/Library/PrivateFrameworks/AppleMobileFileIntegrity.framework/Versions/A/AppleMobileFileIntegrity", "/usr/lib/libmis.dylib", "/System/Library/PrivateFrameworks/MobileSystemServices.framework/Versions/A/MobileSystemServices", "/System/Library/PrivateFrameworks/ConfigProfileHelper.framework/Versions/A/ConfigProfileHelper", "/System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics", "/System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce", "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling", "/usr/lib/libxslt.1.dylib", "/usr/lib/libcmph.dylib", "/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji", "/System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData", "/System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon", "/System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement", "/usr/lib/libTLE.dylib" ] } ### next-swc installation next-swc is installed correctly for aarch64-apple-darwin ### next-swc shared object dependencies /Users/ojkwon/github/next.js-upstream/node_modules/@next/swc-darwin-arm64/next-swc.darwin-arm64.node: /Users/runner/work/next.js/next.js/target/aarch64-apple-darwin/release/deps/libnext_swc_napi.dylib (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1228.0.0) /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60420.60.24) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /Users/ojkwon/github/next.js-upstream/node_modules/@next/swc-darwin-arm64/next-swc.darwin-arm64.node [arm64]: -platform: platform minOS sdk macOS 12.0 13.1 -segments: load-offset segment section sect-size seg-size perm 0x00000000 __TEXT 94304KB r.x 0x00001680 __text 66042588 0x03EFD15C __stubs 3336 0x03EFDE64 __init_offsets 112 0x03EFDED4 __gcc_except_tab 5771520 0x0447F000 __const 8830192 0x04CEACF0 __cstring 128 0x04CEAD70 __unwind_info 2417156 0x04F38F78 __eh_frame 13496364 0x05C18000 __DATA_CONST 3040KB rw. 0x05C18000 __got 2288 0x05C188F0 __const 3101360 0x05F10000 __DATA 512KB rw. 0x05F10000 __data 422352 0x05F771D0 __thread_vars 1656 0x05F77848 __thread_data 104 0x05F778B0 __thread_bss 2776 0x05F78388 __common 62704 0x05F87880 __bss 18424 -dependents: attributes load path /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices /System/Library/Frameworks/Security.framework/Versions/A/Security /usr/lib/libSystem.B.dylib /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation /usr/lib/libiconv.2.dylib ``` </details> |
||
---|---|---|
.cargo | ||
.config | ||
.devcontainer | ||
.github | ||
.husky | ||
.vscode | ||
bench | ||
contributing | ||
docs | ||
errors | ||
examples | ||
packages | ||
scripts | ||
test | ||
.alexignore | ||
.alexrc | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.npmrc | ||
.prettierignore | ||
.prettierignore_staged | ||
.prettierrc.json | ||
.rustfmt.toml | ||
azure-pipelines.yml | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
contributing.md | ||
jest.config.js | ||
jest.replay.config.js | ||
lerna.json | ||
license.md | ||
lint-staged.config.js | ||
package.json | ||
plopfile.js | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
readme.md | ||
release.js | ||
run-tests.js | ||
rust-toolchain | ||
test-file.txt | ||
tsconfig-tsec.json | ||
tsconfig.json | ||
tsec-exemptions.json | ||
turbo.json | ||
UPGRADING.md | ||
vercel.json |
Next.js
Getting Started
Visit https://nextjs.org/learn to get started with Next.js.
Documentation
Visit https://nextjs.org/docs to view the full documentation.
Who is using Next.js?
Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.
Community
The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.
To chat with other community members you can join the Next.js Discord.
Our Code of Conduct applies to all Next.js community channels.
Contributing
Please see our contributing.md.
Good First Issues
We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.
Authors
- Tim Neutkens (@timneutkens)
- Naoyuki Kanezawa (@nkzawa)
- Guillermo Rauch (@rauchg)
- Arunoda Susiripala (@arunoda)
- Tony Kovanen (@tonykovanen)
- Dan Zajdband (@impronunciable)
Security
If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email security@vercel.com
to disclose any security vulnerabilities.