botpress / messaging

Botpress messaging server
42 stars 37 forks source link

Package Err. #575

Closed ismailtunga closed 1 year ago

ismailtunga commented 1 year ago

yarn no problem yarn build no problem yarn package

 YN0000: └ Completed in 3s 749ms
➤ YN0000: Done with warnings in 6s 739ms
√ Built in 3.14s

dist\index.html                        450 B    330ms
dist\index.31b5570d.css             13.97 KB    310ms
dist\index.36da467b.css            287.02 KB    335ms
dist\index.57c42aa1.css              1.99 KB    310ms
dist\index.c7647115.css              5.05 KB    334ms
dist\index.596d8c8c.js            ‼  1.33 MB    338ms
dist\notification.78f319a0.mp3      24.41 KB    159ms
dist\roboto.8b64953f.js                577 B    342ms
dist\roboto.c6e2a5db.css             3.72 KB    309ms
dist\roboto.13d71311.woff2          49.92 KB    251ms
dist\roboto500.56f1b1fb.woff2        50.2 KB    165ms
dist\inject.js                       2.74 KB    341ms
dist\inject.css                        742 B    309ms
[ERROR] Error while packaging app Error: Command failed: ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --target_arch=x64'.' is not recognized as an internal or external command,
operable program or batch file.

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: './node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --target_arch=x64'
}

I am getting such an error. What do you think is the reason

ismailtunga commented 1 year ago
var os = require('os')
let outputPath = './bin'
if (os.platform() == 'win32') {
  outputPath = '.\\bin'
}

const installBindings = async () => {
  const platforms = ['darwin', 'win32', 'linux']

  for (const platform of platforms) {
    let exx = './node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3'
    if (os.platform() == 'win32') {
      exx = '.\\node_modules\\.bin\\node-pre-gyp install --directory=.\\node_modules\\sqlite3'
    }
    await execute(`${exx} --target_platform=${platform} --target_arch=x64`, undefined, { silent: true })
  }
}

\messaging\misc\scripts\package.ts when i edit this file it worked