国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

前端接收老項目啟動時報錯These dependencies were not found

這篇具有很好參考價值的文章主要介紹了前端接收老項目啟動時報錯These dependencies were not found。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

????????當我們下載好老項目,npm install下載node_modules后,用npm run serve啟動時,就會發(fā)現(xiàn)報錯,具體錯誤如下圖所示。

前端接收老項目啟動時報錯These dependencies were not found,前端

?那么這是什么原因呢?

主要就是你的插件版本問題,我這個就是echarts版本太高了,echarts是5的版本。

在網(wǎng)上也找了很多,但是感覺都講不清楚,我也一一試了,沒有用,結果說是npm install --save echarts...這句話用了還是報錯。最后還是我自己慢慢摸索總結出來的結果。

前端接收老項目啟動時報錯These dependencies were not found,前端

有兩種方法:

第一種:

????????第一步:先卸載echarts,然后安裝echarts4的版本,安裝好后

? ? ? ? 第二步:把代碼里的 import Viewer from "v-viewer/src/component.vue" 替換成 import {Component} from "v-viewer"(可以在vscode中全局搜索這句代碼)

? ? ? ? 第三步:在script中有components,在components中把Viewer組件引用改為 Component:Viewer

? ? ? ?第四步:以上步驟完成后再輸入npm run serve重啟就可以了。

如果你只是想先看看項目長什么樣子,可以先使用第一種方法。

????????但是這個方法有一點不好,就是老項目如果還在構建中的話,你到時候寫完代碼想提交上去的時候就會出現(xiàn)問題,因為項目別人用的是echarts5的版本, 你用的4的版本,最后就會出現(xiàn)代碼提交不上去的情況,而且對項目開發(fā)也不好。

這種就說到第二種方法了。我就是第一種用了后打開項目重新優(yōu)化代碼后發(fā)現(xiàn)使用sourcetree提交不上去了,就去問老員工,他教我的第二種方法。簡單來說就是把node_modules里因為echarts版本太高丟失的文件手動加上去。

前端接收老項目啟動時報錯These dependencies were not found,前端

?如上圖所示,劃紅線的就是我確實的文件,通過文件路徑找到對應的文件,例如:第一個echarts/lib/data/helper/comleteDimensions,我們就在項目文件夾搜索對應的路徑直到helper中放入comleteDimensions就可以了。

至于缺失的文件就要找老員工要相應的文件或者是在網(wǎng)上搜看有沒有,放進去就可以了。下圖就是老員工給我的缺失的代碼了。

前端接收老項目啟動時報錯These dependencies were not found,前端

?????????像這種老項目啟動報錯,說實話,最好還是問問老員工該怎么弄,不要像我一樣不好意思問,然后自己琢磨了一個上午,還是沒有弄出來,一上午的時間就浪費了,問了之后半個小時就出來了。畢竟在公司才上一兩天班,你要一直啟動不了項目老板會怎么想你對吧。不要不好意思,大膽問,才能進步!文章來源地址http://www.zghlxwxcb.cn/news/detail-730652.html

到了這里,關于前端接收老項目啟動時報錯These dependencies were not found的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • npm報錯:These dependencies were not found:* canvas in ./node_modules/pdfh5/js/pdf.js* dommatrix/dist/d

    npm報錯:These dependencies were not found:* canvas in ./node_modules/pdfh5/js/pdf.js* dommatrix/dist/d

    npm 報錯: These dependencies were not found: * canvas in ./node_modules/pdfh5/js/pdf.js * dommatrix/dist/dommatrix.js in ./node_modules/pdfh5/js/pdf.js * web-streams-polyfill/dist/ponyfill.js in ./node_modules/pdfh5/js/pdf.worker.js To install them, you can run: npm install --save canvas dommatrix/dist/dommatrix.js web-streams-polyfill/dist/ponyfill.js 不

    2024年02月05日
    瀏覽(105)
  • These dependencies were not found:core-js/modules/es.object.to-string.js in ./src/router/index.js

    These dependencies were not found:core-js/modules/es.object.to-string.js in ./src/router/index.js

    ERROR Failed to compile with 3 errors These dependencies were not found: * core-js/modules/es.object.to-string.js in ./src/router/index.js * core-js/modules/es.string.iterator.js in ./src/router/index.js * core-js/modules/web.dom-collections.iterator.js in ./src/router/index.js To install them, you can run: npm install --save core-js/modules/es.object.to-str

    2024年02月06日
    瀏覽(22)
  • ERROR Failed to compile with 2 errors These relative modules were not found:

    ERROR Failed to compile with 2 errors These relative modules were not found:

    ?提示在./node_modules/flatgeobuf/lib/mjs/packedrtree.js中找不到./config.js ./node_modules/flatgeobuf/lib/mjs/generic/featurecollection.js 中找不到../logger.js 如果是用vscode編寫,按住ctrl+報錯文件名 進入到該報錯文件 根據(jù)引入? import Config from \\\'./config.js\\\' 去尋找路徑\\\'./\\\'下有沒有config.js文件 發(fā)現(xiàn)只有\(zhòng)\\"Conf

    2024年02月02日
    瀏覽(25)
  • springboot+dubbo項目啟動項目時報錯 zookeeper not connected

    項目在公司網(wǎng)絡啟動時,能正常啟動。但通過vpn連接到公司網(wǎng)絡時卻無法啟動報下面的錯誤 java.lang.IllegalStateException: zookeeper not connected 。 猜測:連接到zookeeper的服務器網(wǎng)絡策略不通 — 通過telnet證實端口網(wǎng)絡時通的。該猜測不成立。 進一步經(jīng)過報錯的日志,找到對應的源碼

    2024年02月11日
    瀏覽(21)
  • 解決npm install時報錯Could not resolve dependency

    最近在新的項目使用npm install時發(fā)現(xiàn)報錯: npm WARN cli npm v9.6.4 does not support Node.js v15.14.0. This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || =18.0.0`. You can find the latest version at https://nodejs.org/. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR!? npm ERR! While resolving:

    2024年02月08日
    瀏覽(25)
  • IDEA項目啟動報錯:Failed to execute goal on project xxx: Could not resolve dependencies for project

    IDEA項目啟動報錯:Failed to execute goal on project xxx: Could not resolve dependencies for project

    [ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project Failed to collect dependencies at xxx .xxx-service:jar:dev: Failed to read artifact descriptor for xxxx/maven-snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of nexus-snaps

    2024年02月03日
    瀏覽(247)
  • idea的maven多模塊項目啟動時報錯:Could not find artifact或者錯誤找不到符號

    idea的maven多模塊項目啟動時報錯:Could not find artifact或者錯誤找不到符號

    1、問題描述: 多個項目中遇到idea的多模塊maven項目,在啟動的時候會報錯: 【Could not find artifact,找不到包】 或者 【錯誤:找不到符號(但明明代碼不報紅)】 但是在別人的idea上卻能正常啟動。 2、解決方法: (1)原因說明: 后來發(fā)現(xiàn),項目啟動時,idea會自動調(diào)用mav

    2024年02月17日
    瀏覽(24)
  • MacOS系統(tǒng)啟動React前端項目時報錯Error: EMFILE: too many open files, open解決方法

    MacOS系統(tǒng)啟動React前端項目時報錯Error: EMFILE: too many open files, open解決方法

    最近在開發(fā)React的前端微應用,啟動時模塊構建報錯Module build failed,?Error: EMFILE: too many open files, 如下圖所示:? Error: EMFILE: too many open files的錯誤,經(jīng)排查是因為單個微應用項目較大, 發(fā)布過程中已經(jīng)超過了mac默認的文件監(jiān)聽上限。 通常這類錯誤的原因是因為linux或MacOS的文

    2024年02月07日
    瀏覽(21)
  • 解決gitpush時報錯:hint: Updates were rejected because the remote contains work that you do hint: not have

    當我新建了一個git倉庫,依次執(zhí)行 卻報錯 報這個錯是因為遠程倉庫和本地倉庫文件不同步,解決方法是先執(zhí)行git pull將遠程倉庫文件拉下來使得遠程與本地同步。 解決步驟 1.執(zhí)行 這里的webbrowser換成你的遠程倉庫名 執(zhí)行后會有如下輸出 2.再試試重新推送行不行 發(fā)現(xiàn)還是報錯

    2024年02月16日
    瀏覽(148)
  • 【異?!縅enkins執(zhí)行前端項目Npm構建時,出現(xiàn)報錯This dependency was not found: vue-class-component in ./node_modules/vu

    【異?!縅enkins執(zhí)行前端項目Npm構建時,出現(xiàn)報錯This dependency was not found: vue-class-component in ./node_modules/vu

    同事的代碼變更,導致了在Jenkins無法執(zhí)行構建 錯誤的原因是項目中引入了vue-class-component,但是在項目的依賴列表中,卻沒有找到它,因此會報如上的錯誤。 vue-class-component是一個用于類式Vue組件的TypeScript裝飾器。 它允許您將Vue組件定義為類,這可以使您的代碼更有組織性和

    2024年02月03日
    瀏覽(30)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包