PuruVJ / macos-web

Home Page:https://macos-web.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't Start Server

NovaAndrom3da opened this issue · comments

commented

I am unable to start the server. I have already done:

npm install
npm run dev

The package installing is sucessful, but I get a "unexpected character '?'" error.

I am new to Node.js, so please bare with me :)

commented

(It yields this error when npx vite is called from npm run dev)

commented

Specifically, the error is:

failed to load config from /home/runner/macos-web/vite.config.ts
error when starting preview server:
SyntaxError: Unexpected token '?'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
commented

npm run build nor npm run serve work either. npm run check just returns:

~/macos-web$ npm run check    

> macos-svelte@0.0.0 check /home/[user]/macos-web
> svelte-check --tsconfig ./tsconfig.json


====================================
Loading svelte-check in workspace: /home/[user]/macos-web
Getting Svelte diagnostics...

/home/[user]/macos-web/src/components/Desktop/SystemUpdate.svelte:16:7
Hint: 'needsUpdate' is declared but its value is never read. (ts)
  // Once updateServiceWorker is called, there is a full reload, so the app will be loaded again.
  let needsUpdate: boolean = false;



/home/[user]/macos-web/src/components/apps/Calendar/MonthView.svelte:20:19
Hint: Parameter 'date' implicitly has an 'any' type, but a better type may be inferred from usage. (ts)

  function dayKey(date) {
    return [date, selectedDate.getMonth()].join('-');


====================================
svelte-check found 0 errors, 0 warnings, and 2 hints

Try using pnpm instead of npm

commented

Sadly there was no change. I still got the error. I also removed the clone and re-cloned, but it still returned the same error

~/macos-web/macos-web$ npx pnpm install && npx pnpm run dev
npx: installed 1 in 4.616s
Lockfile is up-to-date, resolution step is skipped
Packages: +395
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 WARN  EXDEV: cross-device link not permitted, link '/home/[user]/.pnpm-store/v3/files/b2/70502f6b52374be3dfed25e8509a4685de42ae7da0ac79ec2d56e70af56eecf7caf0e6630908e219024821cd226ea16dcdb56f28ac887bb4416e86ae89848e' -> '/home/[user]/macos-web/macos-web/node_modules/.pnpm/@neodrag+svelte@1.1.3/node_modules/@neodrag/_tmp_1320_3de0c7ecaa41e0048a88d0215ce42621/dist/index.js'
Falling back to copying packages from store
Packages are copied from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/[user]/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm
 WARN  EXDEV: cross-device link not permitted, link '/home/[user]/.pnpm-store/v3/files/cf/8273a0c186aab33aa4a13f01f86060d390fd4df086579f671b783a91adb95e72dbc5aa91987a02747fd00e346bdcf5089a70976bc72f5904fc27d6c5559b4e' -> '/home/[user]/macos-web/macos-web/node_modules/.pnpm/shebang-command@2.0.0/node_modules/_tmp_1320_20fe0af2fa36bb1c9f068ab9e0ddf723/readme.md'
Falling back to copying packages from store
 WARN  EXDEV: cross-device link not permitted, link '/home/[user]/.pnpm-store/v3/files/5b/d337c8f3eb7d60f976e78eccb320a26ab57b2b018f295fd887e92785970c314a69a69ec81541f01e4eeaa60fd4f05bfc4632aa734c9546ef408db604c72207' -> '/home/[user]/macos-web/macos-web/node_modules/.pnpm/path-key@3.1.1/node_modules/_tmp_1320_a9b1af0374d64db81c36c292b3b7c27b/index.js'
Falling back to copying packages from store
 WARN  EXDEV: cross-device link not permitted, link '/home/[user]/.pnpm-store/v3/files/9c/8b2def76ae5ffe4d636166bf9635d7abd69cdac4bf819a2145f7969646d39ae95c96364bc117f9fa544b98518c294233455d4f665af430c75d70798dd4ab13' -> '/home/[user]/macos-web/macos-web/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/_tmp_1320_4e86bb82c931e5d00839d4ed045a86ff/license'
Falling back to copying packages from store
 WARN  EXDEV: cross-device link not permitted, link '/home/[user]/.pnpm-store/v3/files/cf/38235a03ab2e90631da1758a468b7adf04514b6f2717e247c0623f62135229a3c60e4f88b627d0623b09e20cab27794d22e4dea95a38c89f54d2bcb83ab758' -> '/home/[user]/macos-web/macos-web/node_modules/.pnpm/tslib@2.3.1/node_modules/_tmp_1320_7ab208d7bf51bbbcfe1e0a00c6a29177/tslib.es6.js'
Falling back to copying packages from store
Falling back to copying packages from store
 WARN  11 other warnings
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Falling back to copying packages from store
Progress: resolved 395, reused 395, downloaded 0, added 395, done
node_modules/.pnpm/svelte-preprocess@4.10.2_a7532f736d33b7dddd4e54fd8e6fb1cf/node_modulnode_modules/.pnpm/svelte-preprocess@4.10.2_a7532f736d33b7dddd4e54fd8e6fb1cf/node_modules/svelte-preprocess: Running postinstall script, done in 27ms
node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild: Running postinstall script, done in 204ms

dependencies:
+ @neodrag/svelte 1.1.3
+ date-fns 2.28.0
+ popmotion 11.0.3
+ svelte-local-storage-store 0.2.6
+ unplugin-icons 0.13.0

devDependencies:
+ @iconify-json/gg 1.0.1
+ @iconify-json/ic 1.0.8
+ @iconify-json/icon-park-outline 1.0.2
+ @iconify-json/mdi 1.0.16
+ @iconify-json/pepicons 1.0.5
+ @iconify-json/ph 1.0.4
+ @iconify-json/uil 1.0.2
+ @sveltejs/vite-plugin-svelte 1.0.0-next.37
+ autoprefixer 10.4.2
+ sass 1.49.7
+ svelte 3.46.4
+ svelte-check 2.4.3
+ svelte-preprocess 4.10.2
+ typescript 4.5.5
+ vite 2.7.13
+ vite-plugin-pwa 0.11.13
+ workbox-window 6.4.2
npx: installed 1 in 4.983s

> macos-svelte@0.0.0 dev /home/[user]/macos-web/macos-web
> vite

failed to load config from /home/[user]/macos-web/macos-web/vite.config.ts
error when starting dev server:
SyntaxError: Unexpected token '?'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
 ELIFECYCLE  Command failed with exit code 1.

Rempve pnpm lock, package-lock, and try again, but this time with actual pnpm, without npx

commented

It seems removing pnpm-lock.yaml fixed the problem, thanks.