Skip to content

Commit

Permalink
Fix for windows installation tensorflow#7341
Browse files Browse the repository at this point in the history
Fix a problem with the installation on windows.
My problem on windows was that `./lib/napi-v9` directory didn't exist and `./scripts/deps-stage.js` on line **60** needed the path to symlink or copy the dll. 

My fix was to make sure that the directory `napi-v9` exists with:
`await fs.mkdir(path.dirname(destLibTensorFlowPath), {recursive: true})`;

I'm solving the copy issue with this code.
  • Loading branch information
0x5ca1ab1e committed Jan 8, 2024
1 parent 4d7f465 commit dadc140
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tfjs-node/scripts/deps-stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ async function symlinkDepsLib() {
throw new Error('Destination path not supplied!');
}
try {
await fs.mkdir(path.dirname(destLibTensorFlowPath), {recursive: true});
await symlink(
path.relative(
path.dirname(destLibTensorFlowPath), depsLibTensorFlowPath),
Expand Down

0 comments on commit dadc140

Please sign in to comment.