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

Build fail #499

Open
jrocha opened this issue Oct 22, 2024 · 2 comments
Open

Build fail #499

jrocha opened this issue Oct 22, 2024 · 2 comments
Assignees

Comments

@jrocha
Copy link

jrocha commented Oct 22, 2024

Issue Description
Having trouble getting the project to build and run. Unclear what the recommended build environment is. Tried Windows 11 and Ubuntu 24.04 (WSL) with different issues on each.

Windows Issue

C:\data\human>npm run build
npm warn using --force Recommended protections disabled.

> @vladmandic/[email protected] build
> rimraf test/build.log && node build.js

2024-10-22 10:52:56.304802: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-10-22 10:52:56 DATA:  Build { name: '@vladmandic/human', version: '3.3.3' }
2024-10-22 10:52:56 INFO:  Application: { name: '@vladmandic/human', version: '3.3.3' }
2024-10-22 10:52:56 INFO:  Environment: { profile: 'production', config: '.build.json', package: 'package.json', tsconfig: true, eslintrc: true, git: false }
2024-10-22 10:52:56 INFO:  Toolchain: { build: '0.10.1', esbuild: '0.23.1', typescript: '5.5.4', typedoc: '0.26.7', eslint: '8.57.0' }
2024-10-22 10:52:56 INFO:  Build: { profile: 'production', steps: [ 'clean', 'compile', 'typings', 'typedoc', 'lint', 'changelog' ] }
2024-10-22 10:52:56 STATE: Clean: { locations: [ 'dist/*', 'types/*', 'typedoc/*' ] }
C:\data\human\node_modules\@vladmandic\build\dist\build.js:22338
      throw Object.assign(new Error("Illegal characters in path."), {
                          ^

Error: Illegal characters in path.
    at pathArg (C:\data\human\node_modules\@vladmandic\build\dist\build.js:22338:27)
    at C:\data\human\node_modules\@vladmandic\build\dist\build.js:23015:17
    at run5 (C:\data\human\node_modules\@vladmandic\build\dist\build.js:23054:50)
    at Build.run (C:\data\human\node_modules\@vladmandic\build\dist\build.js:23322:17)
    at main (C:\data\human\build.js:112:15)
    at Object.<anonymous> (C:\data\human\build.js:153:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12) {
  path: 'C:\\data\\\human\\dist\\*',
  code: 'EINVAL'
}

Node.js v20.18.0

Linux Issue

jrocha@DK005:~/human$ npm run build
npm warn using --force Recommended protections disabled.

> @vladmandic/[email protected] build
> rimraf test/build.log && node build.js

2024-10-22 11:54:05.507824: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-10-22 11:54:05.607764: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-10-22 11:54:05 DATA:  Build { name: '@vladmandic/human', version: '3.3.3' }
2024-10-22 11:54:05 INFO:  Application: { name: '@vladmandic/human', version: '3.3.3' }
2024-10-22 11:54:05 INFO:  Environment: { profile: 'production', config: '.build.json', package: 'package.json', tsconfig: true, eslintrc: true, git: true }
2024-10-22 11:54:05 INFO:  Toolchain: { build: '0.10.1', esbuild: '0.23.1', typescript: '5.5.4', typedoc: '0.26.7', eslint: '8.57.0' }
2024-10-22 11:54:05 INFO:  Build: { profile: 'production', steps: [ 'clean', 'compile', 'typings', 'typedoc', 'lint', 'changelog' ] }
2024-10-22 11:54:05 STATE: Clean: { locations: [ 'dist/*', 'types/*', 'typedoc/*' ] }
2024-10-22 11:54:05 STATE: Compile: { name: 'tfjs/browser/version', format: 'esm', platform: 'browser', input: 'tfjs/tf-version.ts', output: 'dist/tfjs.version.js', files: 1, inputBytes: 1289, outputBytes: 358 }
2024-10-22 11:54:05 STATE: Compile: { name: 'tfjs/nodejs/cpu', format: 'cjs', platform: 'node', input: 'tfjs/tf-node.ts', output: 'dist/tfjs.esm.js', files: 2, inputBytes: 566, outputBytes: 957 }
2024-10-22 11:54:05 STATE: Compile: { name: 'human/nodejs/cpu', format: 'cjs', platform: 'node', input: 'src/human.ts', output: 'dist/human.node.js', files: 80, inputBytes: 677631, outputBytes: 321636 }
2024-10-22 11:54:05 STATE: Compile: { name: 'tfjs/nodejs/gpu', format: 'cjs', platform: 'node', input: 'tfjs/tf-node-gpu.ts', output: 'dist/tfjs.esm.js', files: 2, inputBytes: 574, outputBytes: 965 }
2024-10-22 11:54:05 STATE: Compile: { name: 'human/nodejs/gpu', format: 'cjs', platform: 'node', input: 'src/human.ts', output: 'dist/human.node-gpu.js', files: 80, inputBytes: 677639, outputBytes: 321640 }
2024-10-22 11:54:05 STATE: Compile: { name: 'tfjs/nodejs/wasm', format: 'cjs', platform: 'node', input: 'tfjs/tf-node-wasm.ts', output: 'dist/tfjs.esm.js', files: 2, inputBytes: 662, outputBytes: 2003 }
2024-10-22 11:54:05 STATE: Compile: { name: 'human/nodejs/wasm', format: 'cjs', platform: 'node', input: 'src/human.ts', output: 'dist/human.node-wasm.js', files: 80, inputBytes: 678677, outputBytes: 321751 }
2024-10-22 11:54:05 STATE: Compile: { name: 'tfjs/browser/esm/nobundle', format: 'esm', platform: 'browser', input: 'tfjs/tf-browser.ts', output: 'dist/tfjs.esm.js', files: 2, inputBytes: 1403, outputBytes: 690 }
2024-10-22 11:54:05 STATE: Compile: { name: 'human/browser/esm/nobundle', format: 'esm', platform: 'browser', input: 'src/human.ts', output: 'dist/human.esm-nobundle.js', files: 80, inputBytes: 677364, outputBytes: 320212 }
2024-10-22 11:54:05 STATE: Compile: { name: 'tfjs/browser/esm/bundle', format: 'esm', platform: 'browser', input: 'tfjs/tf-browser.ts', output: 'dist/tfjs.esm.js', files: 10, inputBytes: 1403, outputBytes: 1294494 }
2024-10-22 11:54:05 STATE: Compile: { name: 'human/browser/iife/bundle', format: 'iife', platform: 'browser', input: 'src/human.ts', output: 'dist/human.js', files: 80, inputBytes: 1971168, outputBytes: 1610403 }
2024-10-22 11:54:06 STATE: Compile: { name: 'human/browser/esm/bundle', format: 'esm', platform: 'browser', input: 'src/human.ts', output: 'dist/human.esm.js', files: 80, inputBytes: 1971168, outputBytes: 2104939 }
2024-10-22 11:54:07 STATE: Typings: { input: 'src/human.ts', output: 'types/lib', files: 78 }
2024-10-22 11:54:09 STATE: TypeDoc: { input: 'src/human.ts', output: 'typedoc', objects: 81, generated: true }
2024-10-22 11:54:09 STATE: Compile: { name: 'demo/typescript', format: 'esm', platform: 'browser', input: 'demo/typescript/index.ts', output: 'demo/typescript/index.js', files: 1, inputBytes: 6318, outputBytes: 2970 }
2024-10-22 11:54:09 STATE: Compile: { name: 'demo/faceid', format: 'esm', platform: 'browser', input: 'demo/faceid/index.ts', output: 'demo/faceid/index.js', files: 2, inputBytes: 17502, outputBytes: 9401 }
2024-10-22 11:54:09 STATE: Compile: { name: 'demo/tracker', format: 'esm', platform: 'browser', input: 'demo/tracker/index.ts', output: 'demo/tracker/index.js', files: 2, inputBytes: 54375, outputBytes: 22791 }
2024-10-22 11:54:16 STATE: Lint: { locations: [ '**/*.json', 'src/**/*.ts', 'test/**/*.js', 'demo/**/*.js', '**/*.md' ], files: 147, errors: 0, warnings: 0 }
2024-10-22 11:54:16 STATE: ChangeLog: { repository: 'https://github.com/vladmandic/human', branch: 'main', output: 'CHANGELOG.md' }
2024-10-22 11:54:16 INFO:  Done...
2024-10-22 11:54:16 STATE: Copy: { input: 'node_modules/@vladmandic/tfjs/types/tfjs-core.d.ts', output: 'types/tfjs-core.d.ts' }
2024-10-22 11:54:16 STATE: Copy: { input: 'node_modules/@vladmandic/tfjs/types/tfjs.d.ts', output: 'types/tfjs.esm.d.ts' }
2024-10-22 11:54:16 STATE: Copy: { input: 'src/types/tsconfig.json', output: 'types/tsconfig.json' }
2024-10-22 11:54:16 STATE: Copy: { input: 'src/types/eslint.json', output: 'types/.eslintrc.json' }
2024-10-22 11:54:16 STATE: Copy: { input: 'src/types/tfjs.esm.d.ts', output: 'dist/tfjs.esm.d.ts' }
2024-10-22 11:54:16 STATE: Filter: { input: 'types/tfjs-core.d.ts' }
2024-10-22 11:54:17 ERROR: API-Extractor: Error: Unsupported export "Tensor":
/home/jrocha/human/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:115:1
    at ExportAnalyzer.fetchAstModuleFromSourceFile (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:97:35)
    at ExportAnalyzer._fetchSpecifierAstModule (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:705:41)
    at ExportAnalyzer.fetchAstModuleFromSourceFile (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:113:65)
    at ExportAnalyzer._fetchSpecifierAstModule (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:705:41)
    at ExportAnalyzer._tryMatchImportDeclaration (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:475:44)
    at ExportAnalyzer.fetchReferencedAstEntity (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:294:45)
    at AstSymbolTable._analyzeChildTree (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:332:76)
    at AstSymbolTable._analyzeChildTree (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
    at AstSymbolTable._analyzeChildTree (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
    at AstSymbolTable._analyzeChildTree (/home/jrocha/human/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
2024-10-22 11:54:17 STATE: Filter: { input: 'types/human.d.ts' }
2024-10-22 11:54:17 STATE: Write: { output: 'dist/human.esm-nobundle.d.ts' }
2024-10-22 11:54:17 STATE: Write: { output: 'dist/human.esm.d.ts' }
2024-10-22 11:54:17 STATE: Write: { output: 'dist/human.d.ts' }
2024-10-22 11:54:17 STATE: Write: { output: 'dist/human.node-gpu.d.ts' }
2024-10-22 11:54:17 STATE: Write: { output: 'dist/human.node.d.ts' }
2024-10-22 11:54:17 STATE: Write: { output: 'dist/human.node-wasm.d.ts' }
2024-10-22 11:54:17 INFO:  Analyze models: { folders: 8, result: 'models/models.json' }
2024-10-22 11:54:17 STATE: Models { folder: './models', models: 12 }
2024-10-22 11:54:17 STATE: Models: { count: 12, totalSize: 27530157 }
2024-10-22 11:54:17 INFO:  Human Build complete... { logFile: 'test/build.log' }
jrocha@DK005:~/human$

Steps to Reproduce
npm install --dev
npm run build

Expected Behavior

Environment
Environment1: Windows 11, nodejs v20.18.0, Python 3.12.7
Environment2: Ubuntu 24.04, nodejs v20.18.0, Python 3.12.3

  • Human library version? Latest git commit
  • Built-in demo or custom code? Built-in demo
  • Type of module used (e.g. js, esm, esm-nobundle)? N/A
  • TensorFlow/JS version (if not using bundled module)? bundled module
  • Browser or NodeJS and version (e.g. NodeJS 14.15 or Chrome 89)? N/A
  • OS and Hardware platform (e.g. Windows 10, Ubuntu Linux on x64, Android 10)? N/A
  • Packager (if any) (e.g, webpack, rollup, parcel, esbuild, etc.)? N/A
  • Framework (if any) (e.g. React, NextJS, etc.)? N/A
@jrocha
Copy link
Author

jrocha commented Oct 22, 2024

Despite the API-Extractor error, the Ubuntu environment appears to be working. Not sure if this is a spurious error.

@vladmandic
Copy link
Owner

API-Extractor error is due to that lib not being able to handle specific .d.ts definition as its not supported yet, but i don't want to downgrade the rest of the dependencies just to get api-extractor happy. for now, this is expected and does not cause any issues.

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

No branches or pull requests

2 participants