RPA icon indicating copy to clipboard operation
RPA copied to clipboard

npm build fails

Open majikp opened this issue 3 years ago • 3 comments

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

majikp avatar Jan 04 '22 10:01 majikp

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

lubandashi avatar Feb 22 '22 02:02 lubandashi

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'
  },

majikp avatar Feb 24 '22 04:02 majikp

Thanks you, very nice.

lubandashi avatar Feb 24 '22 06:02 lubandashi