question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack Error on cordova build | cordova run

See original GitHub issue

Just after creating a new project using: cordova create <project_create_dir> [com.example.projectname] [ProjectClassName] --template cordova-template-framework7-vue-webpack I did cordova add platform browser . After that on running cordova run browser, I’m getting the following:

`Before deploy hook started… Checking is node modules installed… Node modules already installed. Starting webpack build… Error happened when webpack build: Error: Command failed: “/Users/myuser/Desktop/myproj/node_modules/.bin/webpack”

Webpack build completed to www folder successfully! Error happened on main chain: Error: Error happened when webpack build: Error: Command failed: “/Users/myuser/Desktop/myproj/node_modules/.bin/webpack”

at exec (/Users/myuser/Desktop/myproj/hooks/hookers.js:187:19)
at ChildProcess.exithandler (child_process.js:277:5)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:549:12)

Error: Error happened when webpack build: Error: Command failed: “/Users/myuser/Desktop/myproj/node_modules/.bin/webpack”

`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
scorpionking2k5commented, Jul 15, 2017

fixed it. npm install was probably using package-lock.json as a reference. It did not have vue and fw7 defined. I removed it and ran npm install again. All required deps got installed and its building successfully now.

I’m not very familiar with the concept of package-lock.json . Not sure if it’s being written incorrectly or was I missing a flag to choose the original package.json while running npm install.

Thanks for your time.

0reactions
centrualcommented, Jul 15, 2017

Oh, thanks for response 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building not working ionic 3 - webpack error - Stack Overflow
I was trying to add webpack, karma and jasmine to an ionic 3 app and after all the configurations the console gave me...
Read more >
Cordova build errors - Ionic Forum
Cordova build errors ... The simple thing I tried works well in the browser. But I am unable to deploy it on an...
Read more >
Fixing Cordova's LiveReload when running Webpack
Wanting to mix ReasonML with Cordova, I setup my Webpack configuration and got to work. Quickly I realized that the output generated by...
Read more >
Creating your first Cordova app
Create your first Cordova app. This guide shows you how to create a JS/HTML Cordova application and deploy them to various native mobile...
Read more >
Cordova-plugin-webpack NPM
Simply install this plugin to easily integrate webpack into your Cordova ... Ability to have build scripts by webpack when you build or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found