diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38b03b4..49ada66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: - name: dev小程序项目 working-directory: ../sample-project - run: node --trace-warnings ./../create-uni/scripts/dev.cjs + run: node ./../create-uni/scripts/dev.cjs - name: 打包小程序项目 working-directory: ../sample-project @@ -211,7 +211,7 @@ jobs: - name: dev小程序项目 working-directory: ../sample-project - run: node --trace-warnings ./../create-uni/scripts/dev.cjs + run: node ./../create-uni/scripts/dev.cjs - name: 打包小程序项目 working-directory: ../sample-project diff --git a/scripts/dev.cjs b/scripts/dev.cjs index 6b14a44..367bdf0 100644 --- a/scripts/dev.cjs +++ b/scripts/dev.cjs @@ -15,7 +15,7 @@ const devProcess = spawn('pnpm', ['dev:mp-weixin'], { // 捕获错误输出 devProcess.stderr.on('data', (data) => { console.error(`stderr: ${data}`) - if (!data.include('Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.')) { + if (!data.includes('Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.')) { devProcess.kill() process.exit(1) }