question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File not found when building

See original GitHub issue

Describe the bug The build does not run properly, error: no such file or directory

Logs

❯ npm run build

> midway-svelte@0.0.1 build /home/sovlookup/桌面/新建文件夹 (2)/midway-svelte
> svelte-kit build

vite v2.3.7 building for production...
✓ 92 modules transformed.
build/manifest.json                    1.56kb
build/layout.svelte-646c1d37.js        0.49kb / brotli: 0.29kb
build/error.svelte-71b8bb5c.js         1.19kb / brotli: 0.57kb
build/pages/index.svelte-a4c45f6d.js   1.16kb / brotli: 0.57kb
build/assets/start-a8cd1609.css        0.16kb / brotli: 0.10kb
build/chunks/vendor-f965f831.js        18.55kb / brotli: 6.31kb
build/chunks/index-650274ee.js         24.97kb / brotli: 7.49kb
build/start-d1d56062.js                17.18kb / brotli: 5.50kb
> ENOENT: no such file or directory, open '/home/sovlookup/桌面/新建文件夹 (2)/midway-svelte/.svelte-kit/output/client/_app/manifest.json'
Error: ENOENT: no such file or directory, open '/home/sovlookup/桌面/新建文件夹 (2)/midway-svelte/.svelte-kit/output/client/_app/manifest.json'
    at Object.openSync (node:fs:583:3)
    at Object.readFileSync (node:fs:451:35)
    at build_client (file:///home/sovlookup/%E6%A1%8C%E9%9D%A2/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9%20(2)/midway-svelte/node_modules/_@sveltejs_kit@1.0.0-next.115@@sveltejs/kit/dist/chunks/index5.js:354:49)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async build (file:///home/sovlookup/%E6%A1%8C%E9%9D%A2/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9%20(2)/midway-svelte/node_modules/_@sveltejs_kit@1.0.0-next.115@@sveltejs/kit/dist/chunks/index5.js:231:26)
    at async file:///home/sovlookup/%E6%A1%8C%E9%9D%A2/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9%20(2)/midway-svelte/node_modules/_@sveltejs_kit@1.0.0-next.115@@sveltejs/kit/dist/cli.js:648:23
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! midway-svelte@0.0.1 build: `svelte-kit build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the midway-svelte@0.0.1 build 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!     /home/sovlookup/.npm/_logs/2021-06-14T02_14_30_601Z-debug.log

To Reproduce

https://github.com/SOVLOOKUP/midway-svelte

Severity

The bug prevents me from deploying the app… Hope it can be resolved soon.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dominikgcommented, Jun 14, 2021

on second thought, the part .svelte-kit/output/... doesn’t look right. I was able to replicate the error with an ascii only path

 ENOENT: no such file or directory, open '/home/dominikg/develop/reproductions/midway-svelte/.svelte-kit/output/client/_app/manifest.json'
Error: ENOENT: no such file or directory, open '/home/dominikg/develop/reproductions/midway-svelte/.svelte-kit/output/client/_app/manifest.json'
    at Object.openSync (fs.js:498:3)
    at Object.readFileSync (fs.js:394:35)
    at build_client (file:///home/dominikg/develop/reproductions/midway-svelte/node_modules/@sveltejs/kit/dist/chunks/index5.js:354:49)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async build (file:///home/dominikg/develop/reproductions/midway-svelte/node_modules/@sveltejs/kit/dist/chunks/index5.js:231:26)
    at async file:///home/dominikg/develop/reproductions/midway-svelte/node_modules/@sveltejs/kit/dist/cli.js:648:23
npm ERR! code ELIFECYCLE

does midway mess with the build/output config of vite in any way? (not familiar with it at all)

0reactions
Lxxyxcommented, Jun 16, 2021

@Lxxyx Is it possible that the midway/vite-plugin-hooks can work with kit without any extra config?

The following method will build properly.

import { defineConfig } from '@midwayjs/hooks';

export default defineConfig({
  superjson: true,
  routes: [
    {
      baseDir: 'lambda',
      basePath: '/api',
    },
  ],
  build: {
    viteOutDir: null
  }
} as any);

Thanks for the feedback, I’m considering removing the option to specify viteOutDir in the build to make sure there are no conflicts with other Vite based frameworks

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Build input file cannot be found" | Apple Developer Forums
I had this problem too. Basically, go to the main project at the top of the Project Navigator, select on the Target in...
Read more >
Error 7: File Not Found When Building an Application - NI
Possible reason(s): LabVIEW: File not found. The file might be in a different location or deleted. Use the command prompt or the file...
Read more >
File Not Found - Visual Studio Feedback
I make my changes in files and hit F11 to step-through the program. I often end up with VS warning me the file...
Read more >
Xcode - File not found but build successful - Stack Overflow
I tried the steps mentioned above, but to fix the error I had to remove the file from "Copy Bundle Resources" in the...
Read more >
How to fix "Build input file cannot be found" error in Xcode
Solution · Open "Project Navigator" (Menu View > Navigators > Project ⌘ - command + 1 ). · You will see a group...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found