vue cli3 新建的專案jest 執行報錯

2021-10-05 15:12:53 字數 1306 閱讀 5947

問題描述:

npm err! code elifecycle

npm err! errno 1

npm err! [email protected] unit: `jest --config test/unit/jest.conf.js --coverage`

npm err! exit status 1

npm err!

npm err! failed at the [email protected] unit script.

npm err! this is probably not a problem with npm. there is likely additional logging output above.

npm err! a complete log of this run can be found in:

npm err! /users/v_ligaoyan/.npm/_logs/2020-04-29t06_21_19_561z-debug.log

npm err! code elifecycle

npm err! errno 1

npm err! [email protected] test: `npm run unit`

npm err! exit status 1

npm err!

npm err! failed at the [email protected] test script.

npm err! this is probably not a problem with npm. there is likely additional logging output above.

npm err! a complete log of this run can be found in:

npm err! /users/v_ligaoyan/.npm/_logs/2020-04-29t06_21_19_605z-debug.log

這種問題感覺有點泛泛,網友們的方法:

1…/node_modules/jest/bin/jest.js --clearcach 或者 npm jest --clearcach

位址2.clear down node_modules and remove package-lock.json. re-run npm install.

run npm cache verify and re-run npm install.

位址我試了以上方法都不行,於是降低jest版本後解決:rm -rf node_modules 將json檔案中的jest版本降低比如"^21.0.4」。然後重新安裝再執行。

vue cli3建立專案

預設 引入elementui 1.安裝element ui npm i element ui s 2.在main.js上新增 import elementui from element ui import element ui lib theme chalk index.css vue.use el...

vue cli3設定專案ip

1 建立vue.config.js cli3相對於cli2,之前的build和config資料夾不見了,那麼應該如何配置 如webpack等的配那只需要在專案的根目錄下vue.config.js 檔案 是根目錄,不是src目錄 module.exports open true,配置自動啟動瀏覽器 p...

vue cli3快速建立專案

先檢查vueb v 和 npm v 下面vuecli安裝成功後,如果vue v報錯的話需要以管理員身份開啟powershell 一 安裝 vue cli 更新到 3.x 之後,vue cli 的包名從 vue cli 改成了 vue cli 如果之前全域性安裝了舊版本的 vue cli 1.x 或 ...