seimin 1 year ago
parent
commit
912fe2eeae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      upload/development.js

+ 1 - 1
upload/development.js

@@ -35,7 +35,7 @@ function connectSSh() {
35
 function runTask() {
35
 function runTask() {
36
   //打包完成
36
   //打包完成
37
   console.log(`当前NodeJs版本是${process.version}`);
37
   console.log(`当前NodeJs版本是${process.version}`);
38
-  const isNodeVersionLt17 = parseInt(process.version) < 17;
38
+  const isNodeVersionLt17 = parseInt(process.version.slice(1)) < 17;
39
   const execStr = isNodeVersionLt17 ? 'npm run build' : 'npm run build:17';
39
   const execStr = isNodeVersionLt17 ? 'npm run build' : 'npm run build:17';
40
   if (shell.exec(execStr).code == 0) {
40
   if (shell.exec(execStr).code == 0) {
41
     // if (shell.exec(`find dist -name '*.js' -print0 | xargs -0 gzip -k`).code == 0) {
41
     // if (shell.exec(`find dist -name '*.js' -print0 | xargs -0 gzip -k`).code == 0) {