Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

vite build failed with @icr/polyseg-wasm #16614

Closed
7 tasks done
Qwd2017 opened this issue May 7, 2024 · 0 comments
Closed
7 tasks done

vite build failed with @icr/polyseg-wasm #16614

Qwd2017 opened this issue May 7, 2024 · 0 comments

Comments

@Qwd2017
Copy link

Qwd2017 commented May 7, 2024

Describe the bug

I create a project with vite+vue3, the project need a wasm package named @icr/polyseg-wasm. I install icr package, then run build, the package can't be built successful.

Reproduction

https://github.com/Qwd2017/viteicr.git

Steps to reproduce

No response

System Info

System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Xeon(R) W-2223 CPU @ 3.60GHz
    Memory: 20.44 GB / 31.69 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE  
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD    
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD      
  Browsers:
    Edge: Spartan (44.19041.1266.0)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitejs/plugin-vue: ^5.0.4 => 5.0.4 
    vite: ^5.2.0 => 5.2.11

Used Package Manager

yarn

Logs

PS E:\icr> yarn run build --debug
yarn run v1.22.19
$ vite build --debug
vite:config bundled config file loaded in 236.19ms +0ms
worker.plugins is now a function that returns an array of plugins. Please update your Vite config accordingly.

vite:config using resolved config: {
vite:config plugins: [
vite:config 'vite:build-metadata',
vite:config 'vite:watch-package-data',
vite:config 'vite:pre-alias',
vite:config 'alias',
vite:config 'vite-plugin-wasm',
vite:config 'vite:modulepreload-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:html-inline-proxy',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm-helper',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'vite:vue',
vite:config 'vite:wasm-fallback',
vite:config 'vite:define',
vite:config 'vite:css-post',
vite:config 'vite:build-html',
vite:config 'vite:worker-import-meta-url',
vite:config 'vite:asset-import-meta-url',
vite:config 'vite:force-systemjs-wrap-complete',
vite:config 'commonjs',
vite:config 'vite:data-uri',
vite:config 'vite:dynamic-import-vars',
vite:config 'vite:import-glob',
vite:config 'vite:build-import-analysis',
vite:config 'vite:esbuild-transpile',
vite:config 'vite:terser',
vite:config 'vite:reporter',
vite:config 'vite:load-fallback'
vite:config ],
vite:config worker: { format: 'iife', plugins: '() => plugins', rollupOptions: {} },
vite:config build: {
vite:config target: [ 'es2020', 'edge88', 'firefox78', 'chrome87', 'safari14' ],
vite:config cssTarget: [ 'es2020', 'edge88', 'firefox78', 'chrome87', 'safari14' ],
vite:config outDir: 'dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
vite:config sourcemap: false,
vite:config rollupOptions: {},
vite:config minify: 'esbuild',
vite:config terserOptions: {},
vite:config write: true,
vite:config emptyOutDir: null,
vite:config copyPublicDir: true,
vite:config manifest: false,
vite:config lib: false,
vite:config ssr: false,
vite:config ssrManifest: false,
vite:config ssrEmitAssets: false,
vite:config reportCompressedSize: true,
vite:config chunkSizeWarningLimit: 500,
vite:config watch: null,
vite:config commonjsOptions: { include: [Array], extensions: [Array] },
vite:config dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] },
vite:config modulePreload: { polyfill: true },
vite:config cssMinify: true
vite:config },
vite:config resolve: {
vite:config mainFields: [ 'browser', 'module', 'jsnext:main', 'jsnext' ], vite:config conditions: [],
vite:config extensions: [
vite:config '.mjs', '.js',
vite:config '.mts', '.ts',
vite:config '.jsx', '.tsx',
vite:config '.json'
vite:config ],
vite:config dedupe: [ 'vue' ],
vite:config preserveSymlinks: false,
vite:config alias: [ [Object], [Object] ]
vite:config },
vite:config define: {
vite:config VUE_OPTIONS_API: true,
vite:config VUE_PROD_DEVTOOLS: false,
vite:config VUE_PROD_HYDRATION_MISMATCH_DETAILS: false
vite:config },
vite:config ssr: {
vite:config target: 'node',
vite:config external: [],
vite:config optimizeDeps: { noDiscovery: true, esbuildOptions: [Object] } vite:config },
vite:config configFile: 'E:/icr/vite.config.js',
vite:config configFileDependencies: [ 'E:/icr/vite.config.js' ],
vite:config inlineConfig: {
vite:config root: undefined,
vite:config base: undefined,
vite:config mode: undefined,
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config build: {}
vite:config },
vite:config root: 'E:/icr',
vite:config base: '/',
vite:config rawBase: '/',
vite:config publicDir: 'E:/icr/public',
vite:config cacheDir: 'E:/icr/node_modules/.vite',
vite:config command: 'build',
vite:config mode: 'production',
vite:config isWorker: false,
vite:config mainConfig: null,
vite:config bundleChain: [],
vite:config isProduction: true,
vite:config css: { lightningcss: undefined },
vite:config esbuild: { jsxDev: false },
vite:config server: {
vite:config preTransformRequests: true,
vite:config sourcemapIgnoreList: [Function: isInNodeModules$1],
vite:config middlewareMode: false,
vite:config fs: {
vite:config strict: true,
vite:config allow: [Array],
vite:config deny: [Array],
vite:config cachedChecks: undefined
vite:config }
vite:config },
vite:config preview: {
vite:config port: undefined,
vite:config strictPort: undefined,
vite:config host: undefined,
vite:config https: undefined,
vite:config open: undefined,
vite:config proxy: undefined,
vite:config cors: undefined,
vite:config headers: undefined
vite:config },
vite:config envDir: 'E:/icr',
vite:config env: { BASE_URL: '/', MODE: 'production', DEV: false, PROD: true },
vite:config assetsInclude: [Function: assetsInclude],
vite:config logger: {
vite:config hasWarned: true,
vite:config info: [Function: info],
vite:config warn: [Function: warn],
vite:config warnOnce: [Function: warnOnce],
vite:config error: [Function: error],
vite:config clearScreen: [Function: clearScreen],
vite:config hasErrorLogged: [Function: hasErrorLogged]
vite:config },
vite:config packageCache: Map(1) {
vite:config 'fnpd_E:/icr' => {
vite:config dir: 'E:/icr',
vite:config data: [Object],
vite:config hasSideEffects: [Function: hasSideEffects],
vite:config webResolvedImports: {},
vite:config nodeResolvedImports: {},
vite:config setResolvedCache: [Function: setResolvedCache],
vite:config getResolvedCache: [Function: getResolvedCache]
vite:config },
vite:config set: [Function (anonymous)]
vite:config },
vite:config createResolver: [Function: createResolver],
vite:config optimizeDeps: {
vite:config holdUntilCrawlEnd: true,
vite:config esbuildOptions: { preserveSymlinks: false, plugins: [Array], target: 'esnext' }
vite:config },
vite:config appType: 'spa',
vite:config experimental: { importGlobRestoreExtension: false, hmrPartialAccept: false },
vite:config getSortedPlugins: [Function: getSortedPlugins],
vite:config getSortedPluginHooks: [Function: getSortedPluginHooks]
vite:config } +43ms
vite v5.2.11 building for production...
✓ 19 modules transformed.
x Build failed in 609ms
error during build:
Error: [vite]: Rollup failed to resolve import "a" from "E:/icr/node_modules/@icr/polyseg-wasm/dist/ICRPolySeg.wasm".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at viteWarn (file:///E:/icr/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:67612:27)
at onRollupWarning (file:///E:/icr/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:67640:9)
at onwarn (file:///E:/icr/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:67356:13)
at file:///E:/icr/node_modules/rollup/dist/es/shared/node-entry.js:18518:13 at Object.logger [as onLog] (file:///E:/icr/node_modules/rollup/dist/es/shared/node-entry.js:20166:9)
at ModuleLoader.handleInvalidResolvedId (file:///E:/icr/node_modules/rollup/dist/es/shared/node-entry.js:19108:26)
at file:///E:/icr/node_modules/rollup/dist/es/shared/node-entry.js:19066:26error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Validations

@vitejs vitejs locked and limited conversation to collaborators May 7, 2024
@sapphi-red sapphi-red converted this issue into discussion #16618 May 7, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant