Skip to content

Commit f224f1d

Browse files
Fix for windows installation #7341 (#8122)
* Fix for windows installation #7341 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. * Fix fs.mkdir usage in deps-stage.js
1 parent b004ab6 commit f224f1d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tfjs-node/scripts/deps-stage.js

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const copy = util.promisify(fs.copyFile);
2222
const os = require('os');
2323
const rename = util.promisify(fs.rename);
2424
const symlink = util.promisify(fs.symlink);
25+
const mkdir = util.promisify(fs.mkdir);
2526
const {
2627
depsLibTensorFlowFrameworkPath,
2728
depsLibTensorFlowPath,
@@ -57,6 +58,7 @@ async function symlinkDepsLib() {
5758
throw new Error('Destination path not supplied!');
5859
}
5960
try {
61+
await mkdir(path.dirname(destLibTensorFlowPath), {recursive: true});
6062
await symlink(
6163
path.relative(
6264
path.dirname(destLibTensorFlowPath), depsLibTensorFlowPath),

0 commit comments

Comments
 (0)