A9T9 / RPA

Ui.Vision Open-Source RPA Software - Robotic Process Automation with Computer Vision and OCR, Selenium IDE compatible.
https://ui.vision/rpa
Other
1.3k stars 292 forks source link

npm build fails #106

Closed majikp closed 8 months ago

majikp commented 2 years ago

Hi, It's a great tool. Thanks!! Trying to clone and build but not been able to get it running. npm run build gives below errors, below mentioned directories seems to be missing in the src directory.

ERROR in Entry module not found: Error: Can't resolve './src/desktop_screenshot_editor/index.tsx' ERROR in Entry module not found: Error: Can't resolve './src/options.ts' ERROR in ./src/common/imagesearch/adaptor.ts Module not found: Error: Can't resolve '../../../imagesearch-testextension/src/ts/image-helper' in 'C:\RPA\src\common\imagesearch' @ ./src/common/imagesearch/adaptor.ts 5:23-88 @ ./src/ext/bg.js

ERROR in ./src/common/imagesearch/adaptor.ts Module not found: Error: Can't resolve '../../../imagesearch-testextension/src/ts/job' in 'C:\RPA\src\common\imagesearch' @ ./src/common/imagesearch/adaptor.ts 3:14-70 @ ./src/ext/bg.js

ERROR in ./src/common/imagesearch/adaptor.ts Module not found: Error: Can't resolve '../../../imagesearch-testextension/src/ts/worker-connection' in 'C:\RPA\src\common\imagesearch' @ ./src/common/imagesearch/adaptor.ts 4:28-98 @ ./src/ext/bg.js

ERROR in ./src/vision_editor/index.tsx Module not found: Error: Can't resolve '@/services/timeout/cs_timeout' in 'C:\RPA\src\vision_editor' @ ./src/vision_editor/index.tsx 18:21-61

lubandashi commented 2 years ago

Is your problem solved ? I also encountered the same problem .

majikp commented 2 years ago

Is your problem solved ? I also encountered the same problem .

Yes, sort of. I didn't need the vision editor, imagesearch etc. if these functionalities are not required then you can exclude them in the tsconfig.json. once done, it should build it. also, I have commented it in the entry point in webpack.prod.config.js( not sure if this is really required but try with and without)

tsconfig.json

"exclude": [
    "./test-fileaccess",
    "./test-fileaccess2",
    "./test-xy",
    "./test-xy-v1031",
    "./webextension-imagesearch-1.0.1-extension",
    "./imagesearch-testextension",
    "./test-desktopsearch",
    "./src/common/imagesearch",
    "./src/vision_editor",
  ]

webpack.prod.config.js

module.exports = {
  entry: {
    popup:            './src/index.js',
    csv_editor:       './src/csv_editor.js',
    //vision_editor:    './src/vision_editor/index.tsx',
    //desktop_screenshot_editor: './src/desktop_screenshot_editor/index.tsx',
   // options:          './src/options.ts',
    content_script:   './src/ext/content_script/index.js',
    inject:           './src/ext/inject.js',
    background:       './src/ext/bg.js'
  },
lubandashi commented 2 years ago

Thanks you, very nice.