Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building problem #386

Open
andrea-dellepiane opened this issue Nov 28, 2024 · 2 comments
Open

Building problem #386

andrea-dellepiane opened this issue Nov 28, 2024 · 2 comments

Comments

@andrea-dellepiane
Copy link

Trying to build from cloned repo I get:
ERROR error during build: 20:43:43
[vite-plugin-static-copy:build] No file was found to copy on C:\repos\git\formeo\src\lib\icons\formeo-sprite.svg src.
at collectCopyTargets (file:///C:/repos/git/formeo/node_modules/vite-plugin-static-copy/dist/index.js:512:13)
at async copyAll (file:///C:/repos/git/formeo/node_modules/vite-plugin-static-copy/dist/index.js:577:23)
at async Object.writeBundle (file:///C:/repos/git/formeo/node_modules/vite-plugin-static-copy/dist/index.js:1105:22)
at async Promise.all (index 1)
at async PluginDriver.hookParallel (file:///C:/repos/git/formeo/node_modules/rollup/dist/es/shared/node-entry.js:21127:9)
at async file:///C:/repos/git/formeo/node_modules/rollup/dist/es/shared/node-entry.js:22170:13
at async catchUnfinishedHookActions (file:///C:/repos/git/formeo/node_modules/rollup/dist/es/shared/node-entry.js:21545:16)
at async build (file:///C:/repos/git/formeo/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:65449:16)
at async CAC. (file:///C:/repos/git/formeo/node_modules/vite/dist/node/cli.js:828:5)

But the file C:\repos\git\formeo\src\lib\icons\formeo-sprite.svg is there...
Any suggestion?

@kevinchappell
Copy link
Collaborator

kevinchappell commented Nov 29, 2024

Can you describe a bit more of the steps to replicate the problem and your computer OS nevermind, I see it's Windows. I suspect it may have to do with path resolution on a Windows machine but I don't have one to test.

I will try to replicate the problem and see what's happening

@andrea-dellepiane
Copy link
Author

andrea-dellepiane commented Dec 2, 2024

I just cloned the repo in a folder (C:\repos\git) cd in the formeo dir and called npm install and npm run build.
Here you can find the commands I issued and the output (did it all as administrator in order to overcome security issues that may arise):
c:\repos\git>git clone https://github.com/Draggable/formeo.git
Cloning into 'formeo'...
remote: Enumerating objects: 5705, done.
remote: Counting objects: 100% (1525/1525), done.
remote: Compressing objects: 100% (779/779), done.
remote: Total 5705 (delta 801), reused 1366 (delta 724), pack-reused 4180 (from 1)
Receiving objects: 100% (5705/5705), 11.01 MiB | 8.36 MiB/s, done.
Resolving deltas: 100% (3263/3263), done.

c:\repos\git>cd formeo

c:\repos\git\formeo>npm install
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead

[email protected] prepare
lefthook install

sync hooks: ✔️ (commit-msg, pre-push)

added 689 packages, and audited 932 packages in 9s

187 packages are looking for funding
run npm fund for details

1 high severity vulnerability

To address all issues, run:
npm audit fix

Run npm audit for details.

c:\repos\git\formeo>npm run build

[email protected] prebuild
npm run build:lib

[email protected] build:lib
vite build --config vite.config.lib.mjs

vite v5.4.11 building for production...
✓ 334 modules transformed.
dist/formeo.min.css 43.87 kB │ gzip: 7.37 kB
dist/formeo.es.js 342.53 kB │ gzip: 82.11 kB
dist/formeo.min.css 43.87 kB │ gzip: 7.37 kB
dist/formeo.cjs.js 146.92 kB │ gzip: 47.47 kB
dist/formeo.min.css 43.87 kB │ gzip: 7.37 kB
dist/formeo.umd.js 147.16 kB │ gzip: 47.57 kB
✓ built in 2.65s

[email protected] build
npm-run-all -p build:icons build:demo

[email protected] build:demo
vite build --mode demo

[email protected] build:icons
node ./tools/generate-sprite

vite v5.4.11 building for demo... 14:50:18
✓ 385 modules transformed. 14:50:19

ERROR x Build failed in 4.26s 14:50:22

../../dist/demo/index.html 3.31 kB │ gzip: 1.52 kB 14:50:22
../../dist/demo/assets/img/github.png 4.11 kB 14:50:22
../../dist/demo/assets/js/theme-github_light_default.min.js 4.76 kB 14:50:22
../../dist/demo/assets/img/formeo-logo.svg 10.33 kB │ gzip: 4.65 kB 14:50:22
../../dist/demo/assets/js/mode-json.min.js 10.48 kB 14:50:22
../../dist/demo/assets/css/demo.min.css 47.21 kB │ gzip: 8.18 kB 14:50:22
../../dist/demo/assets/js/demo.min.js 612.02 kB │ gzip: 175.18 kB 14:50:22

WARN 14:50:22
(!) Some chunks are larger than 500 kB after minification. Consider:

✨ [vite-plugin-compression]:algorithm=gzip - compressed file successfully:
demo/assets/js/mode-json.min.js.gz 10.33kb / gzip: 2.45kb 14:50:22
demo/assets/css/demo.min.css.gz 46.19kb / gzip: 7.99kb 14:50:22
demo/assets/js/demo.min.js.gz 597.98kb / gzip: 170.53kb 14:50:22
14:50:22

ERROR error during build: 14:50:22
[vite-plugin-static-copy:build] No file was found to copy on c:\repos\git\formeo\src\lib\icons\formeo-sprite.svg src.
at collectCopyTargets (file:///c:/repos/git/formeo/node_modules/vite-plugin-static-copy/dist/index.js:512:13)
at async copyAll (file:///c:/repos/git/formeo/node_modules/vite-plugin-static-copy/dist/index.js:577:23)
at async Object.writeBundle (file:///c:/repos/git/formeo/node_modules/vite-plugin-static-copy/dist/index.js:1105:22)
at async Promise.all (index 1)
at async PluginDriver.hookParallel (file:///c:/repos/git/formeo/node_modules/rollup/dist/es/shared/node-entry.js:21127:9)
at async file:///c:/repos/git/formeo/node_modules/rollup/dist/es/shared/node-entry.js:22170:13
at async catchUnfinishedHookActions (file:///c:/repos/git/formeo/node_modules/rollup/dist/es/shared/node-entry.js:21545:16)
at async build (file:///c:/repos/git/formeo/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:65449:16)
at async CAC. (file:///c:/repos/git/formeo/node_modules/vite/dist/node/cli.js:828:5)

ERROR: "build:demo" exited with 1.

Obviusly if I open this c:\repos\git\formeo\src\lib\icons\formeo-sprite.svg the file exists and can be open

Thanks in advance for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants