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.

Cannot resolve module 'highcharts/highcharts-more' at the build (Gulp build)

See original GitHub issue

Hi guys,

I have an issue at the compilation when i launch gulp build which is :

modulesModuleNotFoundError: Module not found: Error: Cannot resolve module 'highcharts/highcharts-more'
......
resolve module highcharts/highcharts-more in ..... node_modules/highcharts doesn't exist (module as directory)

However, i can see that angular2-highcharts is installed during the npm install (with Highcharts module)

For information i use Webpack. My vendor.js have these lines :

import 'highcharts';
import 'highcharts/highcharts-more';
import 'highcharts/modules/solid-gauge';
import 'highcharts/modules/map';

And in my .ts file i have :

import { Highcharts} from 'angular2-highcharts';

require('highcharts/highcharts-more')(Highcharts);
require('highcharts/modules/solid-gauge')(Highcharts)

I use Jenkins by the way. In my local environment the build works, but in the distant server the error occurs.

And i have no errors in my console when i run the app locally

Thanks !!

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
oitejjhocommented, Oct 23, 2017

go to project directory and run “npm install highcharts”

1reaction
maxastercommented, Oct 31, 2016

Thanks @Sfairet and @gevgeny for your responses !

@Sfairet, I tried your proposition but it’s change nothing for me.

@gevgeny, I 'm trying your version but I can’t make this import :

import * as HighchartsMore from 'highcharts/highcharts-more';

Webstorm tell me that the file ‘highcharts-more’ can not be resolved.

I check in the folder node_module/@types/highcharts/ and there is only highstock.d.ts.

There is one thing that I don’t understand. How my build can be work locally, on my computer, and no on my distant server… very strange. Sorry guys but this error make me so mad

Read more comments on GitHub >

github_iconTop Results From Across the Web

gulp-webpack can't resolve node modules - Stack Overflow
I am using gulp-webpack for fast development builds. I need webpack for my typescript bundling because I am obviously relying on some node ......
Read more >
Documentation - Gulp - TypeScript
This quick start guide will teach you how to build TypeScript with gulp and then add Browserify, terser, or Watchify to the gulp...
Read more >
Getting Started with Gulp.js - Semaphore Tutorial
Create an Express project. Install NPM modules. Create gulpfile.js . Load plugins and create tasks. Run tasks from the command line.
Read more >
gulp-inject - npm
NPM version semantic-release Build Status XO code style Dependency Status. A stylesheet, javascript and webcomponent reference injection ...
Read more >
CI Build broken by Gulp Error - Visual Studio Feedback
Today when we queue a build, the gulp step is throwing an error: ... D:\a\1\s\LASRX</span> Error: Cannot find module 'vinyl-sourcemaps-apply' at Function.
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