bitpay / cordova-plugin-qrscanner

A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
MIT License
568 stars 772 forks source link

Installing plugin in OutSystems #137

Closed marcoamrebelo closed 6 years ago

marcoamrebelo commented 6 years ago

Following this article explaining how to install a custom Cordova plugin on the OutSystems platform I've tried to install the qrscanner and got the following error:

Failed to install 'cordova-plugin-qrscanner':Error: Uh oh! ENOENT: no such file or directory, open '/opt/NativeBuilder/builds/5b82b857-b4a9-4266-ac61-4fb769ff0077/source/plugins/cordova-plugin-qrscanner/www/www.min.js'

I've included the full error Log in the attached file. AndroidBuildLog.txt

Any help is welcome.

Revo86 commented 6 years ago

i have the exact same error

budidao commented 6 years ago

i facing the same error.. anyone have any updates regarding this issue?

budidao commented 6 years ago

I have find solution for my case: the www/www.min.js file is automated generated when we do cordova plugin add cordova-plugin-qrscanner then i just use that file and create the www folder, and it's working fine.

alexceee commented 6 years ago

Same problem with cordova 8.0.0. Does anyone have a solution?

bitjson commented 6 years ago

Fixed in 2.6.0 🚀

gserneels commented 5 years ago

I just had the exact same problem with version 2.6.0... :-( I use Visual Studio 2017, added the plugin and when I build the solution, I get this error:

ENOENT: no such file or directory, open 'C:\Users\Gert\source\repos\BlankCordovaApp1\BlankCordovaApp1\plugins\cordova-plugin-qrscanner\www\www.min.js'

yelban commented 4 years ago

cordova 9.0.0 facing the same error again.

Failed to install 'cordova-plugin-qrscanner': Error: Uh oh! ENOENT: no such file or directory, open '/Users/xxx/projectXXX/cordova/plugins/cordova-plugin-qrscanner/www/www.min.js'

silkroadnomad commented 4 years ago

you can somehow fix this problem, when going into the plugin folder and run npm i
and then gulp

I also upgraded gulp since old gulp pulls a lot of vulnerable npm packages. In this case you need to migrate gulpfile.js

which results in some sort of

const prepackTask = (cb) => {
  webpack('webpack.prepack.config.js', cb);
}

const webpackCordovaTask = (cb) => {
  webpack('webpack.cordova.config.js', cb);
}

const distTask = (cb) => {
  webpack('webpack.library.config.js', cb);
}

const remapTask = () => {
  return gulp.src(['dist/plugin.min.js', 'dist/www.min.js'])
      .pipe(insert.prepend(remap))
      .pipe(gulp.dest('dist'));
}

const pluginTask = () => {
    return gulp.src(['dist/plugin.min.js'])
        .pipe(gulp.dest('src/browser'));
}

const wwwTask = () => {
  return gulp.src(['dist/www.min.js'])
      .pipe(gulp.dest('www'));
}

gulp.task('prepack',prepackTask)
gulp.task('webpack-cordova',gulp.series(prepackTask,webpackCordovaTask))
gulp.task('dist',gulp.series(prepackTask,distTask))
gulp.task('remap',gulp.series(webpackCordovaTask,remapTask))
gulp.task('plugin',gulp.series(remapTask,pluginTask))
gulp.task('www',gulp.series(remapTask,wwwTask))
gulp.task('default',gulp.series(distTask,pluginTask,wwwTask))

(tho this doesn't seem to work full yet, it might help you)