第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

有兩個(gè)具有相同標(biāo)識(shí)符的導(dǎo)入打字稿

有兩個(gè)具有相同標(biāo)識(shí)符的導(dǎo)入打字稿

桃花長(zhǎng)相依 2023-01-06 11:29:27
從我閱讀的內(nèi)容來(lái)看,導(dǎo)入這兩個(gè)庫(kù)似乎是解決 WebGL 錯(cuò)誤的方法,我遇到了一個(gè)錯(cuò)誤,似乎公認(rèn)的解決方案是這樣導(dǎo)入:import PIXI, { Graphics } from 'pixi.js-legacy';import PIXI from 'pixi.js';但是,這樣做會(huì)導(dǎo)致以下問(wèn)題:/x/y/FILE_PATH: Identifier 'PIXI' has already been declared (2:7)以及重復(fù)的標(biāo)識(shí)符: declare namespace PIXI {  ~~~~~~~  node_modules/pixi.js/pixi.js.d.ts:4:1    4 declare namespace PIXI {      ~~~~~~~    Conflicts are in this file.node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:14:9 - error TS2323: Cannot redeclare exported variable 'VERSION'.14     var VERSION: string;           ~~~~~~~node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:3408:9 - error TS2323: Cannot redeclare exported variable 'defaultVertex'.3408     var defaultVertex: string;             ~~~~~~~~~~~~~node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:3414:9 - error TS2323: Cannot redeclare exported variable 'defaultFilterVertex'.3414     var defaultFilterVertex: string;             ~~~~~~~~~~~~~~~~~~~node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:11929:9 - error TS2323: Cannot redeclare exported variable 'GRAPHICS_CURVES'.11929     var GRAPHICS_CURVES: {              ~~~~~~~~~~~~~~~node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:13426:9 - error TS2323: Cannot redeclare exported variable 'PI_2'.13426     var PI_2: number;              ~~~~node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:13434:9 - error TS2323: Cannot redeclare exported variable 'RAD_TO_DEG'.13434     var RAD_TO_DEG: number;              ~~~~~~~~~~node_modules/pixi.js-legacy/pixi.js-legacy.d.ts:13442:9 - error TS2323: Cannot redeclare exported variable 'DEG_TO_RAD'.13442     var DEG_TO_RAD: number;              ~~~~~~~~~~我是否有任何選項(xiàng)可以在不刪除其中一個(gè)導(dǎo)入的情況下完成這項(xiàng)工作?
查看完整描述

1 回答

?
智慧大石

TA貢獻(xiàn)1946條經(jīng)驗(yàn) 獲得超3個(gè)贊

使用導(dǎo)入別名,如下所示:import PIXI as PIXIJS from 'pixi.js'

參考:https ://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Statements/import


查看完整回答
反對(duì) 回復(fù) 2023-01-06
  • 1 回答
  • 0 關(guān)注
  • 175 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)