LulumiProject / lulumi-browser

Lulumi-browser is a lightweight browser coded with Vue.js 2 and Electron.
Apache License 2.0
437 stars 90 forks source link

yarn run dev 报错 #59

Open 82318179 opened 3 years ago

82318179 commented 3 years ago

yarn install --ignore-engines 正常 yarn run build:dll 正常 yarn run dev 报错如下: `ERROR in src/main/api/lulumi-extension.ts:15:20 TS2306: File 'C:/Users/tt/Desktop/lulumi-browser-master/src/main/constants.ts' is not a module. 13 | import * as mimeTypes from 'mime-types'; 14 |

15 | import config from '../constants'; | ^^^^^^^^^^^^^^ 16 | import './listeners'; 17 | 18 | // ../../shared/store/mainStore.ts

ERROR in src/main/constants.ts TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o0'.

ERROR in src/main/index.ts:27:23 TS2306: File 'C:/Users/tt/Desktop/lulumi-browser-master/src/main/constants.ts' is not a module. 25 | import localshortcut from 'electron-localshortcut'; 26 | import autoUpdater from './lib/auto-updater';

27 | import constants from './constants'; | ^^^^^^^^^^^^^ 28 | import menu from './lib/menu'; 29 | import promisify from './lib/promisify'; 30 | import fetch from './lib/fetch';

ERROR in src/main/lib/view.ts:8:23 TS2306: File 'C:/Users/tt/Desktop/lulumi-browser-master/src/main/constants.ts' is not a module. 6 | import * as path from 'path'; 7 | import urlUtil from '../../renderer/lib/url-util';

8 | import constants from '../constants'; | ^^^^^^^^^^^^^^ 9 | import fetch from './fetch'; 10 | 11 | const { default: mainStore } = require('../../shared/store/mainStore');

ERROR in src/main/constants.ts:1:1 no-unused-expressions: Expected an assignment or function call and instead saw an expression.

1 | 0000000000000000000000000000000000000000 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ERROR in src/main/constants.ts:1:1 no-octal: Octal literals should not be used.

1 | 0000000000000000000000000000000000000000 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ERROR in src/main/constants.ts:1:41 eol-last: Newline required at end of file but not found.

1 | 0000000000000000000000000000000000000000 | ^

ERROR in src/main/constants.ts:1:41 semi: Missing semicolon.

1 | 0000000000000000000000000000000000000000`

82318179 commented 3 years ago

关注这个项目一年了,每次都报错,没有一次能成功运行的,是我的电脑不行吗?

qazbnm456 commented 3 years ago

請問你編譯的版本是最新的 commit 嗎?或許你可以試試看用 VSCode 打開專案並在裡面的 Terminal 編譯,並在告知我是否可以正常編譯。謝謝!

82318179 commented 3 years ago

win10 電腦 , yarn 的版本為:1.22.5 ; lulumi-browser 代碼為最新下載的;使用 VSCODE 打開 lulumi-browser 執行 yarn install --ignore-engines ---OK 執行 yarn run build:dll ---OK 執行 yarn run dev ---OK 執行 yarn run build:win32 -----報錯信息如下: 4 5 6 7 8 9 10

82318179 commented 3 years ago

在執行完 yarn run build:win32 後 ,發現文件夾 lulumi-browser-master\src\main 下面的文件 constants.ts 的內容被修改為一串零。然後就報錯了。

1111

qazbnm456 commented 3 years ago

請問你專案載下來的方式是?我推測你是直接下載 zip 檔,但要使用 git clone https://github.com/LulumiProject/lulumi-browse.git 的方式下載下來才行喔!原因是我的專案有使用到 git-rev-sync 去抓當下的 .git 目錄,但如果你是用 zip 下載,解壓縮完後並不會包含 .git 目錄。

82318179 commented 3 years ago

果然是這個原因,下載項目的方式換成 git 拉取,發現沒有任何問題了。