Closed marcoamrebelo closed 6 years ago
i have the exact same error
i facing the same error.. anyone have any updates regarding this issue?
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.
Same problem with cordova 8.0.0. Does anyone have a solution?
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'
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'
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)
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:
I've included the full error Log in the attached file. AndroidBuildLog.txt
Any help is welcome.