Closed spvn closed 2 years ago
I tried to downgrade my node version from 17.0.1 (which is the current version) to 16.13.0 and the yarn build
issue is fixed
This should be fixed on master. Anyone having issues still should ensure you're working from a clean slate
git stash # Stash any local file changes git checkout master git pull yarn cache clean # Clear your node modules lerna clean -y yarn install lerna bootstrap yarn build # Try again
If you're still having issues after this, please paste your terminal log here.
This worked for me too!! I really appreciate your help!!
I'm still getting this error on fresh install of Metaplex... Using m1 chip
[5/5] 🔨 Building fresh packages...
[6/25] ⢀ secp256k1
[11/25] ⢀ keccak
[10/25] ⢀ secp256k1
[8/25] ⢀ pngquant-bin
error /Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.5
node-pre-gyp info using node@14.17.0 | darwin | arm64
node-pre-gyp info check checked for "/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas/build/Release/canvas.node" (not found)
node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-darwin-unknown-arm64.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-darwin-unknown-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@14.17.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-darwin-unknown-arm64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.1
gyp info using node@14.17.0 | darwin | arm64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.1
gyp info using node@14.17.0 | darwin | arm64
gyp info find Python using Python version 2.7.18 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jakejohnson/Library/Caches/node-gyp/14.17.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/jakejohnson/Library/Caches/node-gyp/14.17.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/jakejohnson/Library/Caches/node-gyp/14.17.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 21.1.0
gyp ERR! command "/Users/jakejohnson/.nvm/versions/node/v14.17.0/bin/node" "/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/jakejohnson/.nvm/versions/node/v14.17.0/bin/node /Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/jakejohnson/metaplex-foundation/metaplex/js/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.
I was able to work around it by brew installing canvas:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
This should be fixed on master. Anyone having issues still should ensure you're working from a clean slate
git stash # Stash any local file changes git checkout master git pull yarn cache clean # Clear your node modules lerna clean -y yarn install lerna bootstrap yarn build # Try again
If you're still having issues after this, please paste your terminal log here.
@carthanas
I'm on master, followed all advice on this thread, still getting the following error:
$ yarn build
yarn run v1.22.10
$ lerna run build
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 4 packages: "yarn run build"
lerna info run Ran npm script 'build' in '@oyster/common' in 21.9s:
$ run-s build-ts build-css
$ tsc
$ less-watch-compiler src/ dist/lib/ --run-once
Running less-watch-compiler once.
lerna ERR! yarn run build exited 2 in '@metaplex/cli'
lerna ERR! yarn run build stdout:
$ tsc -p ./src
node_modules/typescript/lib/lib.dom.d.ts(25,1): error TS6200: Definitions of the following identifiers conflict with those in another file: NodeFilter, XPathNSResolver, SVGMatrix, WebKitCSSMatrix, SVGPoint, SVGRect, location, webkitURL, ImportExportKind, TableKind, ValueType, ExportValue, Exports, ImportValue, Imports, ModuleImports, ElementTagNameMap, name, AlgorithmIdentifier, BigInteger, BlobPart, BodyInit, BufferSource, COSEAlgorithmIdentifier, CanvasImageSource, ConstrainBoolean, ConstrainDOMString, ConstrainDouble, ConstrainULong, DOMHighResTimeStamp, DOMTimeStamp, EventListenerOrEventListenerObject, Float32List, FormDataEntryValue, GLbitfield, GLboolean, GLclampf, GLenum, GLfloat, GLint, GLint64, GLintptr, GLsizei, GLsizeiptr, GLuint, GLuint64, HTMLOrSVGImageElement, HTMLOrSVGScriptElement, HashAlgorithmIdentifier, HeadersInit, IDBValidKey, ImageBitmapSource, InsertPosition, Int32List, LineAndPositionSetting, MediaProvider, MessageEventSource, MutationRecordType, NamedCurve, OnBeforeUnloadEventHandler, OnErrorEventHandler, PerformanceEntryList, ReadableStreamController, ReadableStreamDefaultReadResult, ReadableStreamReader, RenderingContext, RequestInfo, TexImageSource, TimerHandler, Transferable, Uint32List, UvmEntries, UvmEntry, VibratePattern, WindowProxy, AlignSetting, AnimationPlayState, AppendMode, AttestationConveyancePreference, AudioContextLatencyCategory, AudioContextState, AuthenticatorAttachment, AuthenticatorTransport, AutoKeyword, AutomationRate, BinaryType, BiquadFilterType, CanPlayTypeResult, CanvasDirection, CanvasFillRule, CanvasLineCap, CanvasLineJoin, CanvasTextAlign, CanvasTextBaseline, ChannelCountMode, ChannelInterpretation, ClientTypes, ColorSpaceConversion, CompositeOperation, CompositeOperationOrAuto, CredentialMediationRequirement, DOMParserSupportedType, DirectionSetting, DisplayCaptureSurfaceType, DistanceModelType, DocumentReadyState, EndOfStreamError, EndingType, FillMode, FullscreenNavigationUI, GamepadHapticActuatorType, GamepadMappingType, IDBCursorDirection, IDBRequestReadyState, IDBTransactionMode, ImageOrientation, ImageSmoothingQuality, IterationCompositeOperation, KeyFormat, KeyType, KeyUsage, LineAlignSetting, MediaDeviceKind, MediaKeyMessageType, MediaKeySessionType, MediaKeyStatus, MediaKeysRequirement, MediaStreamTrackState, NavigationType, NotificationDirection, NotificationPermission, OrientationLockType, OrientationType, OscillatorType, OverSampleType, PanningModelType, PaymentComplete, PermissionName, PermissionState, PlaybackDirection, PositionAlignSetting, PremultiplyAlpha, PublicKeyCredentialType, PushEncryptionKeyName, PushPermissionState, RTCBundlePolicy, RTCDataChannelState, RTCDtlsTransportState, RTCIceCandidateType, RTCIceComponent, RTCIceConnectionState, RTCIceCredentialType, RTCIceGathererState, RTCIceGatheringState, RTCIceProtocol, RTCIceTcpCandidateType, RTCIceTransportPolicy, RTCIceTransportState, RTCPeerConnectionState, RTCRtcpMuxPolicy, RTCRtpTransceiverDirection, RTCSdpType, RTCSignalingState, RTCStatsIceCandidatePairState, RTCStatsType, ReadyState, ReferrerPolicy, RequestCache, RequestCredentials, RequestDestination, RequestMode, RequestRedirect, ResidentKeyRequirement, ResizeObserverBoxOptions, ResizeQuality, ResponseType, ScrollBehavior, ScrollLogicalPosition, ScrollRestoration, ScrollSetting, SelectionMode, ServiceWorkerState, ServiceWorkerUpdateViaCache, ShadowRootMode, SpeechSynthesisErrorCode, TextTrackKind, TextTrackMode, TouchType, UserVerificationRequirement, VideoFacingModeEnum, VisibilityState, WebGLPowerPreference, WorkerType, XMLHttpRequestResponseType
node_modules/typescript/lib/lib.dom.d.ts(1288,5): error TS2687: All declarations of 'localCandidateId' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1294,5): error TS2687: All declarations of 'remoteCandidateId' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1301,5): error TS2687: All declarations of 'state' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1304,5): error TS2687: All declarations of 'transportId' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1532,5): error TS2687: All declarations of 'id' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1533,5): error TS2687: All declarations of 'timestamp' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1534,5): error TS2687: All declarations of 'type' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1551,5): error TS2687: All declarations of 'dtlsState' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1716,5): error TS2687: All declarations of 'documentURI' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1717,5): error TS2687: All declarations of 'effectiveDirective' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1719,5): error TS2687: All declarations of 'originalPolicy' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1722,5): error TS2687: All declarations of 'statusCode' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(1723,5): error TS2687: All declarations of 'violatedDirective' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(3733,5): error TS2687: All declarations of 'privateKey' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(3734,5): error TS2687: All declarations of 'publicKey' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(11157,5): error TS2687: All declarations of 'constraint' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(15207,14): error TS2687: All declarations of 'type' must have identical modifiers.
node_modules/typescript/lib/lib.dom.d.ts(18209,5): error TS2687: All declarations of 'customElements' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(7,1): error TS6200: Definitions of the following identifiers conflict with those in another file: NodeFilter, XPathNSResolver, SVGMatrix, WebKitCSSMatrix, SVGPoint, SVGRect, location, webkitURL, ImportExportKind, TableKind, ValueType, ExportValue, Exports, ImportValue, Imports, ModuleImports, ElementTagNameMap, name, AlgorithmIdentifier, BigInteger, BlobPart, BodyInit, BufferSource, COSEAlgorithmIdentifier, CanvasImageSource, ConstrainBoolean, ConstrainDOMString, ConstrainDouble, ConstrainULong, DOMHighResTimeStamp, DOMTimeStamp, EventListenerOrEventListenerObject, Float32List, FormDataEntryValue, GLbitfield, GLboolean, GLclampf, GLenum, GLfloat, GLint, GLint64, GLintptr, GLsizei, GLsizeiptr, GLuint, GLuint64, HTMLOrSVGImageElement, HTMLOrSVGScriptElement, HashAlgorithmIdentifier, HeadersInit, IDBValidKey, ImageBitmapSource, InsertPosition, Int32List, LineAndPositionSetting, MediaProvider, MessageEventSource, MutationRecordType, NamedCurve, OnBeforeUnloadEventHandler, OnErrorEventHandler, PerformanceEntryList, ReadableStreamController, ReadableStreamDefaultReadResult, ReadableStreamReader, RenderingContext, RequestInfo, TexImageSource, TimerHandler, Transferable, Uint32List, UvmEntries, UvmEntry, VibratePattern, WindowProxy, AlignSetting, AnimationPlayState, AppendMode, AttestationConveyancePreference, AudioContextLatencyCategory, AudioContextState, AuthenticatorAttachment, AuthenticatorTransport, AutoKeyword, AutomationRate, BinaryType, BiquadFilterType, CanPlayTypeResult, CanvasDirection, CanvasFillRule, CanvasLineCap, CanvasLineJoin, CanvasTextAlign, CanvasTextBaseline, ChannelCountMode, ChannelInterpretation, ClientTypes, ColorSpaceConversion, CompositeOperation, CompositeOperationOrAuto, CredentialMediationRequirement, DOMParserSupportedType, DirectionSetting, DisplayCaptureSurfaceType, DistanceModelType, DocumentReadyState, EndOfStreamError, EndingType, FillMode, FullscreenNavigationUI, GamepadHapticActuatorType, GamepadMappingType, IDBCursorDirection, IDBRequestReadyState, IDBTransactionMode, ImageOrientation, ImageSmoothingQuality, IterationCompositeOperation, KeyFormat, KeyType, KeyUsage, LineAlignSetting, MediaDeviceKind, MediaKeyMessageType, MediaKeySessionType, MediaKeyStatus, MediaKeysRequirement, MediaStreamTrackState, NavigationType, NotificationDirection, NotificationPermission, OrientationLockType, OrientationType, OscillatorType, OverSampleType, PanningModelType, PaymentComplete, PermissionName, PermissionState, PlaybackDirection, PositionAlignSetting, PremultiplyAlpha, PublicKeyCredentialType, PushEncryptionKeyName, PushPermissionState, RTCBundlePolicy, RTCDataChannelState, RTCDtlsTransportState, RTCIceCandidateType, RTCIceComponent, RTCIceConnectionState, RTCIceCredentialType, RTCIceGathererState, RTCIceGatheringState, RTCIceProtocol, RTCIceTcpCandidateType, RTCIceTransportPolicy, RTCIceTransportState, RTCPeerConnectionState, RTCRtcpMuxPolicy, RTCRtpTransceiverDirection, RTCSdpType, RTCSignalingState, RTCStatsIceCandidatePairState, RTCStatsType, ReadyState, ReferrerPolicy, RequestCache, RequestCredentials, RequestDestination, RequestMode, RequestRedirect, ResidentKeyRequirement, ResizeObserverBoxOptions, ResizeQuality, ResponseType, ScrollBehavior, ScrollLogicalPosition, ScrollRestoration, ScrollSetting, SelectionMode, ServiceWorkerState, ServiceWorkerUpdateViaCache, ShadowRootMode, SpeechSynthesisErrorCode, TextTrackKind, TextTrackMode, TouchType, UserVerificationRequirement, VideoFacingModeEnum, VisibilityState, WebGLPowerPreference, WorkerType, XMLHttpRequestResponseType
../../../../node_modules/@types/web/index.d.ts(14,5): error TS2717: Subsequent property declarations must have the same type. Property 'iv' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(18,5): error TS2717: Subsequent property declarations must have the same type. Property 'counter' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(27,5): error TS2717: Subsequent property declarations must have the same type. Property 'additionalData' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(28,5): error TS2717: Subsequent property declarations must have the same type. Property 'iv' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(221,5): error TS2374: Duplicate string index signature.
../../../../node_modules/@types/web/index.d.ts(269,5): error TS2687: All declarations of 'privateKey' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(270,5): error TS2687: All declarations of 'publicKey' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(529,5): error TS2717: Subsequent property declarations must have the same type. Property 'info' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(530,5): error TS2717: Subsequent property declarations must have the same type. Property 'salt' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(663,5): error TS2374: Duplicate string index signature.
../../../../node_modules/@types/web/index.d.ts(997,5): error TS2717: Subsequent property declarations must have the same type. Property 'supportedMethods' must be of type 'string | string[]', but here has type 'string'.
../../../../node_modules/@types/web/index.d.ts(1019,5): error TS2717: Subsequent property declarations must have the same type. Property 'supportedMethods' must be of type 'string | string[]', but here has type 'string'.
../../../../node_modules/@types/web/index.d.ts(1033,5): error TS2717: Subsequent property declarations must have the same type. Property 'salt' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(1107,5): error TS2374: Duplicate string index signature.
../../../../node_modules/@types/web/index.d.ts(1231,5): error TS2687: All declarations of 'localCandidateId' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1233,5): error TS2687: All declarations of 'remoteCandidateId' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1238,5): error TS2687: All declarations of 'state' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1240,5): error TS2687: All declarations of 'transportId' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1397,5): error TS2687: All declarations of 'id' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1398,5): error TS2687: All declarations of 'timestamp' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1399,5): error TS2687: All declarations of 'type' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1413,5): error TS2687: All declarations of 'dtlsState' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1474,5): error TS2717: Subsequent property declarations must have the same type. Property 'window' must be of type 'any', but here has type 'null'.
../../../../node_modules/@types/web/index.d.ts(1510,5): error TS2717: Subsequent property declarations must have the same type. Property 'label' must be of type 'ArrayBuffer | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array', but here has type 'BufferSource'.
../../../../node_modules/@types/web/index.d.ts(1548,5): error TS2687: All declarations of 'documentURI' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1549,5): error TS2687: All declarations of 'effectiveDirective' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1551,5): error TS2687: All declarations of 'originalPolicy' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1555,5): error TS2687: All declarations of 'statusCode' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(1556,5): error TS2687: All declarations of 'violatedDirective' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(2601,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(3134,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(3167,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'CSSStyleSheet' must be of type '{ new (): CSSStyleSheet; prototype: CSSStyleSheet; }', but here has type '{ new (options?: CSSStyleSheetInit): CSSStyleSheet; prototype: CSSStyleSheet; }'.
../../../../node_modules/@types/web/index.d.ts(3882,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(3916,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(3926,5): error TS2374: Duplicate string index signature.
../../../../node_modules/@types/web/index.d.ts(3992,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(4068,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(4094,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'DeviceMotionEvent' must be of type '{ new (type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; prototype: DeviceMotionEvent; requestPermission(): Promise<...>; }', but here has type '{ new (type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; prototype: DeviceMotionEvent; }'.
../../../../node_modules/@types/web/index.d.ts(4119,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'DeviceOrientationEvent' must be of type '{ new (type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; prototype: DeviceOrientationEvent; requestPermission(): Promise<...>; }', but here has type '{ new (type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; prototype: DeviceOrientationEvent; }'.
../../../../node_modules/@types/web/index.d.ts(4156,14): error TS2717: Subsequent property declarations must have the same type. Property 'applets' must be of type 'HTMLCollectionOf<HTMLAppletElement>', but here has type 'HTMLCollection'.
../../../../node_modules/@types/web/index.d.ts(4911,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'EventSource' must be of type '{ new (url: string, eventSourceInitDict?: EventSourceInit): EventSource; prototype: EventSource; readonly CLOSED: number; readonly CONNECTING: number; readonly OPEN: number; }', but here has type '{ new (url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource; prototype: EventSource; readonly CLOSED: number; readonly CONNECTING: number; readonly OPEN: number; }'.
../../../../node_modules/@types/web/index.d.ts(4978,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(5372,5): error TS2717: Subsequent property declarations must have the same type. Property '"submit"' must be of type 'Event', but here has type 'SubmitEvent'.
../../../../node_modules/@types/web/index.d.ts(5627,5): error TS2717: Subsequent property declarations must have the same type. Property 'onsubmit' must be of type '(this: GlobalEventHandlers, ev: Event) => any', but here has type '(this: GlobalEventHandlers, ev: SubmitEvent) => any'.
../../../../node_modules/@types/web/index.d.ts(5685,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(5940,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(5956,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(6247,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(6248,5): error TS2374: Duplicate string index signature.
../../../../node_modules/@types/web/index.d.ts(6970,5): error TS2717: Subsequent property declarations must have the same type. Property 'preload' must be of type 'string', but here has type '"" | "auto" | "none" | "metadata"'.
../../../../node_modules/@types/web/index.d.ts(7536,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(7836,14): error TS2717: Subsequent property declarations must have the same type. Property 'cells' must be of type 'HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>', but here has type 'HTMLCollectionOf<HTMLTableCellElement>'.
../../../../node_modules/@types/web/index.d.ts(8597,14): error TS2717: Subsequent property declarations must have the same type. Property 'canvas' must be of type 'HTMLCanvasElement | OffscreenCanvas', but here has type 'HTMLCanvasElement'.
../../../../node_modules/@types/web/index.d.ts(8617,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'ImageData' must be of type '{ new (sw: number, sh: number): ImageData; new (data: Uint8ClampedArray, sw: number, sh?: number): ImageData; prototype: ImageData; }', but here has type '{ new (sw: number, sh: number, settings?: ImageDataSettings): ImageData; new (data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData; prototype: ImageData; }'.
../../../../node_modules/@types/web/index.d.ts(8914,14): error TS2717: Subsequent property declarations must have the same type. Property 'closed' must be of type 'Promise<void>', but here has type 'Promise<MediaKeySessionClosedReason>'.
../../../../node_modules/@types/web/index.d.ts(8979,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(9328,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(9455,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(9582,14): error TS2717: Subsequent property declarations must have the same type. Property 'parentNode' must be of type 'Node & ParentNode', but here has type 'ParentNode'.
../../../../node_modules/@types/web/index.d.ts(9707,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(9723,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(9765,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Notification' must be of type '{ new (title: string, options?: NotificationOptions): Notification; prototype: Notification; readonly maxActions: number; readonly permission: NotificationPermission; requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise<...>; }', but here has type '{ new (title: string, options?: NotificationOptions): Notification; prototype: Notification; readonly permission: NotificationPermission; requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise<...>; }'.
../../../../node_modules/@types/web/index.d.ts(9868,14): error TS2687: All declarations of 'constraint' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(9871,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'OverconstrainedError' must be of type '{ new (): OverconstrainedError; prototype: OverconstrainedError; }', but here has type '{ new (constraint: string, message?: string): OverconstrainedError; prototype: OverconstrainedError; }'.
../../../../node_modules/@types/web/index.d.ts(9999,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'PaymentRequest' must be of type '{ new (methodData: PaymentMethodData[], details: PaymentDetailsInit, options?: PaymentOptions): PaymentRequest; prototype: PaymentRequest; }', but here has type '{ new (methodData: PaymentMethodData[], details: PaymentDetailsInit): PaymentRequest; prototype: PaymentRequest; }'.
../../../../node_modules/@types/web/index.d.ts(10094,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'PerformanceMark' must be of type '{ new (): PerformanceMark; prototype: PerformanceMark; }', but here has type '{ new (markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; prototype: PerformanceMark; }'.
../../../../node_modules/@types/web/index.d.ts(10371,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(10393,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(10559,5): error TS2717: Subsequent property declarations must have the same type. Property '"error"' must be of type 'RTCErrorEvent', but here has type 'Event'.
../../../../node_modules/@types/web/index.d.ts(10575,5): error TS2717: Subsequent property declarations must have the same type. Property 'onerror' must be of type '(this: RTCDataChannel, ev: RTCErrorEvent) => any', but here has type '(this: RTCDataChannel, ev: Event) => any'.
../../../../node_modules/@types/web/index.d.ts(10663,5): error TS2717: Subsequent property declarations must have the same type. Property '"icecandidateerror"' must be of type 'RTCPeerConnectionIceErrorEvent', but here has type 'Event'.
../../../../node_modules/@types/web/index.d.ts(10683,5): error TS2717: Subsequent property declarations must have the same type. Property 'onicecandidateerror' must be of type '(this: RTCPeerConnection, ev: RTCPeerConnectionIceErrorEvent) => any', but here has type '(this: RTCPeerConnection, ev: Event) => any'.
../../../../node_modules/@types/web/index.d.ts(11039,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Response' must be of type '{ new (body?: BodyInit, init?: ResponseInit): Response; prototype: Response; error(): Response; redirect(url: string, status?: number): Response; }', but here has type '{ new (body?: BodyInit, init?: ResponseInit): Response; prototype: Response; error(): Response; redirect(url: string | URL, status?: number): Response; }'.
../../../../node_modules/@types/web/index.d.ts(12091,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(12231,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(12282,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(12399,14): error TS2717: Subsequent property declarations must have the same type. Property 'currentTranslate' must be of type 'DOMPoint', but here has type 'DOMPointReadOnly'.
../../../../node_modules/@types/web/index.d.ts(12437,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'SVGSVGElement' must be of type '{ new (): SVGSVGElement; prototype: SVGSVGElement; readonly SVG_ZOOMANDPAN_DISABLE: number; readonly SVG_ZOOMANDPAN_MAGNIFY: number; readonly SVG_ZOOMANDPAN_UNKNOWN: number; }', but here has type '{ new (): SVGSVGElement; prototype: SVGSVGElement; }'.
../../../../node_modules/@types/web/index.d.ts(12493,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(12762,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'SVGViewElement' must be of type '{ new (): SVGViewElement; prototype: SVGViewElement; readonly SVG_ZOOMANDPAN_DISABLE: number; readonly SVG_ZOOMANDPAN_MAGNIFY: number; readonly SVG_ZOOMANDPAN_UNKNOWN: number; }', but here has type '{ new (): SVGViewElement; prototype: SVGViewElement; }'.
../../../../node_modules/@types/web/index.d.ts(12981,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'SharedWorker' must be of type '{ new (scriptURL: string, options?: string | WorkerOptions): SharedWorker; prototype: SharedWorker; }', but here has type '{ new (scriptURL: string | URL, options?: string | WorkerOptions): SharedWorker; prototype: SharedWorker; }'.
../../../../node_modules/@types/web/index.d.ts(13040,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13062,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13073,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13226,5): error TS2374: Duplicate string index signature.
../../../../node_modules/@types/web/index.d.ts(13267,5): error TS2687: All declarations of 'type' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(13291,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13543,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13567,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13639,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(13745,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'URL' must be of type '{ new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }', but here has type '{ new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(obj: Blob | MediaSource): string; revokeObjectURL(url: string): void; }'.
../../../../node_modules/@types/web/index.d.ts(13854,5): error TS2717: Subsequent property declarations must have the same type. Property '"resize"' must be of type 'UIEvent', but here has type 'Event'.
../../../../node_modules/@types/web/index.d.ts(13862,5): error TS2717: Subsequent property declarations must have the same type. Property 'onresize' must be of type '(this: VisualViewport, ev: UIEvent) => any', but here has type '(this: VisualViewport, ev: Event) => any'.
../../../../node_modules/@types/web/index.d.ts(15361,14): error TS2717: Subsequent property declarations must have the same type. Property 'canvas' must be of type 'HTMLCanvasElement | OffscreenCanvas', but here has type 'HTMLCanvasElement'.
../../../../node_modules/@types/web/index.d.ts(15955,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'WebSocket' must be of type '{ new (url: string, protocols?: string | string[]): WebSocket; prototype: WebSocket; readonly CLOSED: number; readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; }', but here has type '{ new (url: string | URL, protocols?: string | string[]): WebSocket; prototype: WebSocket; readonly CLOSED: number; readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; }'.
../../../../node_modules/@types/web/index.d.ts(15998,14): error TS2687: All declarations of 'customElements' must have identical modifiers.
../../../../node_modules/@types/web/index.d.ts(16023,5): error TS2717: Subsequent property declarations must have the same type. Property 'opener' must be of type 'Window', but here has type 'any'.
../../../../node_modules/@types/web/index.d.ts(16025,14): error TS2717: Subsequent property declarations must have the same type. Property 'orientation' must be of type 'string | number', but here has type 'number'.
../../../../node_modules/@types/web/index.d.ts(16108,5): error TS2375: Duplicate number index signature.
../../../../node_modules/@types/web/index.d.ts(16558,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'CompileError' must be of type '{ new (): CompileError; prototype: CompileError; }', but here has type '{ (message?: string): CompileError; new (message?: string): CompileError; prototype: CompileError; }'.
../../../../node_modules/@types/web/index.d.ts(16586,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'LinkError' must be of type '{ new (): LinkError; prototype: LinkError; }', but here has type '{ (message?: string): LinkError; new (message?: string): LinkError; prototype: LinkError; }'.
../../../../node_modules/@types/web/index.d.ts(16616,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'RuntimeError' must be of type '{ new (): RuntimeError; prototype: RuntimeError; }', but here has type '{ (message?: string): RuntimeError; new (message?: string): RuntimeError; prototype: RuntimeError; }'.
../../../../node_modules/@types/web/index.d.ts(16629,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'Table' must be of type '{ new (descriptor: TableDescriptor): Table; prototype: Table; }', but here has type '{ new (descriptor: TableDescriptor, value?: any): Table; prototype: Table; }'.
../../../../node_modules/@types/web/index.d.ts(17060,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'opener' must be of type 'Window', but here has type 'any'.
../../../../node_modules/@types/web/index.d.ts(17062,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'orientation' must be of type 'string | number', but here has type 'number'.
../../../../node_modules/@types/web/index.d.ts(17379,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'onsubmit' must be of type '(this: Window, ev: Event) => any', but here has type '(this: Window, ev: SubmitEvent) => any'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
error Command failed with exit code 2.
lerna ERR! yarn run build exited 2 in '@metaplex/cli'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Not always able to respond here but I'll do my best to help.
Two things I notice just offhand:
That issue looks very different to any of the others listed here or that I've seen in the last few weeks. It looks like your typescript module installation is hosed. I would suggest a scorched earth policy and start completely over again.
Master is not the best to start from. Rather than trying to keep the master branch permanently stable, a few days ago Jordan and the team moved towards semantic versioning for releases.
It would be best to start with a fresh clone of the repo and checkout v1.0.0 as detailed here https://github.com/metaplex-foundation/metaplex#how-to-checkout-a-release
If you still have the issue with that version of the code then I would say something is screwy with your machine or there is a genuine bug that needs to be reported to the dev team.
For what its worth, I've checked out v1.0.0 on a mac and ubuntu box and both of them are working fine.
Thanks, you were right. Turns out I had a version of TypeScript installed globally that was messing with the build.
sorted, i did the following;
git clone https://github.com/carthanas/metaplex.git cd metaplex git checkout bf1bc27098ab9a8b5fda4feef2209f5ccfbc8207 -- js/yarn.lock cd js yarn install yarn bootstrap yarn build
Thanks @carthanas
Thanks for the feedback man 🙏 It also just worked for me after hours of trials ! Have you been able to yarn run the CLI in js/web/packages/cli/ ?
sorted, i did the following;
git clone https://github.com/carthanas/metaplex.git cd metaplex git checkout bf1bc27098ab9a8b5fda4feef2209f5ccfbc8207 -- js/yarn.lock cd js yarn install yarn bootstrap yarn build
Thanks @carthanas
I followed the steps but getting same error on running yarn build lerna ERR! yarn run build exited 2 in '@metaplex/cli' lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately. error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.**
I've deleted my forked repository as it seems to be causing people more confusion than help and the fix has already been merged into upstream.
@safiyanaaz Try the latest release version as outlined here https://github.com/metaplex-foundation/metaplex/issues/817#issuecomment-962690631
Pretty confident the metaplex team has fixed this.
Here is the latest advice I can give to those having trouble.
git clone git@github.com:metaplex-foundation/metaplex.git
cd metaplex
git checkout tags/v1.0.0 -b mybranch
cd js
yarn install
yarn bootstrap
yarn build
yarn run v1.22.15
$ lerna run build
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 5 packages: "yarn run build"
lerna info run Ran npm script 'build' in '@oyster/common' in 68.4s:
$ run-s build-ts build-css
$ tsc
$ less-watch-compiler src/ dist/lib/ --run-once
Running less-watch-compiler once.
lerna ERR! yarn run build exited 2 in '@metaplex/cli'
lerna ERR! yarn run build stdout:
$ tsc -p ./src
../../node_modules/@types/react/index.d.ts(3084,19): error TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}, any>' and 'Component<any, {}, any>'.
Named property 'props' of types 'Component<any, {}, any>' and 'Component<any, {}, any>' are not identical.
../../node_modules/@types/react/index.d.ts(3084,19): error TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}, any>' and 'Component<any, {}, any>'.
Named property 'refs' of types 'Component<any, {}, any>' and 'Component<any, {}, any>' are not identical.
../../node_modules/@types/react/index.d.ts(3092,14): error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
../../../../../node_modules/@types/react/index.d.ts(3100,14): error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
../../../../../node_modules/@types/react/index.d.ts(3111,13): error TS2717: Subsequent property declarations must have the same type. Property 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes
I'm getting this error when running yarn build. Typescript is definitely installed and
tsc --version
shows 4.4.4. Any ideas what I'm doing wrong? I've already called yarn install and yarn bootstrap before this.