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.

npm run build failed with

See original GitHub issue

System information

  • Linux Ubuntu 18.04
  • Python 3.6

Describe the problem

Describe the problem clearly here. Be sure to convey here why it’s a bug or a feature request.

Source code / logs

When running the command npm run build, the following error message appears:

ERROR in ./components/stats.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./components/stats.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve 'vue-chartjs/es/BaseCharts/Doughnut' in '/home/frank/Desktop/phac_project/doccano/app/server/static/components'
 @ ./components/stats.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./components/stats.vue?vue&type=script&lang=js&) 36:0-58 76:11-19
 @ ./components/stats.vue?vue&type=script&lang=js&
 @ ./components/stats.vue
 @ ./pages/stats.js

ERROR in ./components/stats.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./components/stats.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve 'vue-chartjs/es/BaseCharts/HorizontalBar' in '/home/frank/Desktop/phac_project/doccano/app/server/static/components'
 @ ./components/stats.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./components/stats.vue?vue&type=script&lang=js&) 35:0-68 41:11-24
 @ ./components/stats.vue?vue&type=script&lang=js&
 @ ./components/stats.vue
 @ ./pages/stats.js

ERROR in ./components/stats.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./components/stats.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve 'vue-chartjs/es/mixins/reactiveProp' in '/home/frank/Desktop/phac_project/doccano/app/server/static/components'
 @ ./components/stats.vue?vue&type=script&lang=js& (./node_modules/vue-loader/lib??vue-loader-options!./components/stats.vue?vue&type=script&lang=js&) 37:0-62 43:11-23 78:11-23
 @ ./components/stats.vue?vue&type=script&lang=js&
 @ ./components/stats.vue
 @ ./pages/stats.js

npm ERR! Linux 4.15.0-51-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! server@1.0.0 build: `webpack`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the server@1.0.0 build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/frank/Desktop/phac_project/doccano/app/server/static/npm-debug.log

Problem fixed when reverting to commit 0c1414348f856efc1631de7bb24e51160704ebc2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
frankniujccommented, Jun 20, 2019

@Hironsan Yes. Upgrade npm to 6.9.1 and the problem is solved.

3reactions
Hironsancommented, Jun 18, 2019

@frankniujc Please update Node and npm version. After that, run npm install and npm run build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run build - fails to compile despite development version ...
I have a react app created with create-react-app , and npm run build is failing to compile a production build. It throws the...
Read more >
`npm run build` is failing on CI but runs fine on local machine
Hey I got really weird problem. I use CRA with TypeScript template. I cannot build my app using npm run build on Github...
Read more >
npm ERR! Missing script: "build" [Solved] | bobbyhadz
To solve the npm ERR! Missing script: "build" error, make sure to add a build command to the scripts object in your package.json...
Read more >
Error when running npm run build : r/react - Reddit
I have a react app done and am attempting to learn how to deploy it for the first time. I type npm run...
Read more >
npm run build command fails - Salesforce Stack Exchange
Windows still has some tweaks necessary, if you look in package.json in the scripts field you'll see the run command, which probably looks ......
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