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

npm run build error #117

Open
pxhy opened this issue May 8, 2024 · 1 comment
Open

npm run build error #117

pxhy opened this issue May 8, 2024 · 1 comment

Comments

@pxhy
Copy link

pxhy commented May 8, 2024

npm run build

prebuild
rimraf dist

build
run-script-os

build:windows
env-cmd -f ./automation/ts-node.env.js node --max_old_space_size=8192 node_modules/webpack/bin/webpack.js --config ./automation/webpack.prod.ts

Sentry source map upload disabled - no token set
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\monaco.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\vendors-node_modules_ethersproject_abi_lib_esm_abi-coder_js-node_modules_fortawesome_free-bra-cda2f5.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\apis.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\zstd.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\main.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\vendors-node_modules_crypto-browserify_index_js.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\vendors-node_modules_ajv_dist_ajv_js-node_modules_base64-js_index_js-node_modules_http-encodi-0d88b4.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\vendors-node_modules_buffer_index_js-node_modules_js-beautify_js_lib_beautifier_js-node_modul-ce59fd.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\mockttp.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\src_services_ui-worker_ts.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\vendors-node_modules_bn_js_lib_bn_js-node_modules_path-browserify_index_js.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\node_modules_brotli-wasm_pkg_bundler_brotli_wasm_js.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\node_modules_css-loader_dist_runtime_getUrl_js-data_image_png_base64_iVBORw0KGgoAAAANSUhEUgAA-2b41e20.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\node_modules_css-loader_dist_runtime_getUrl_js-data_image_png_base64_iVBORw0KGgoAAAANSUhEUgAA-2b41e21.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist_d546-_8131-_3fc0-_cad2-_593c-_4068-_e7e4-_7bec-_802b-_1e44-_0aec-_fbf1-_b4cc.bundle.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\ui-update-worker.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\editor.worker.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\css.worker.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\html.worker.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\json.worker.js": no such file
Error parsing bundle asset "F:\GoProject\httptoolkit-ui-main\dist\ts.worker.js": no such file

No bundles were parsed. Analyzer will show only original module sizes from stats file.

Webpack Bundle Analyzer saved report to F:\GoProject\httptoolkit-ui-main\dist\report.html
ERROR in Cannot read properties of undefined (reading 'source')

webpack 5.89.0 compiled with 1 error in 106556 ms

@pimterry
Copy link
Member

pimterry commented May 9, 2024

Not sure I'm afraid! The same script does work in our automated builds on GitHub (on Linux, but it shouldn't make a difference) and on my local machines (Linux & Mac). There's certainly other contributors using Windows though, so I would have expected it to work (unless some very recent change has broken something).

It seems that this is due to bundle analyzer not finding your built assets when it runs. Do those files exist in the dist directory mentioned here? Do the paths look correct for your setup? It'd be interesting to know if it's searching wrong, or if the files aren't being created as expected for some reason.

If there's no easy fix I think it should be possible to work around this, but of course I'd like to know what's wrong so we can solve this properly. Is there anything else unusual about your setup?

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