Description
Your project looks like fun. I set it up using the command you have in the instructions.
cordova create <project_create_dir> [com.example.projectname] [ProjectClassName] --template cordova-template-framework7-vue-webpack
No errors. One warning that I think may be relevant is:
npm WARN [email protected] requires a peer of uglify-js@^2.8.0 but none was installed.
I then ran npm install
All good.
When I run webpack I get
Error: Cannot find module 'uglify-js'
So, I installed the Android platform cordova platform add android
All good.
Then I and ran cordova build android
And I get
Error: Cannot find module 'uglify-js'
I checked node_modules\
and I found uglify-es
, uglifyjs-webpack-plugin
, uglify-to-browserify
Not sure about that uglify-es
folder.
In the package.js
file in dev it says,
"uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony",
"uglifyjs-webpack-plugin": "^0.3.0",
When I try to
npm install --save-dev uglify-js@github:mishoo/UglifyJS2#harmony
I now see a uglify-js folder in the node-modules
folder, but I still get the same uglify-js not found
error.
I'm on Linux and checked my $PATH for conflicting settings. No path specified for node_modules. That's all good, no reference at all.
I haven't installed uglify globally. That would probably solve the issue though it might make reference to the Harmony version difficult, breaking support for ES6 (I'm guessing?).
I'm new to webpack (previous gulp exp.) so maybe I'm using Webpack incorrectly or missing a step?
Running
Node v 7.2.1
Cordova v 6.5.0
NPM v 3.10.10
Any advice appreciated. Thank you in advance.