Cannot resolve module 'highcharts/highcharts-more' at the build (Gulp build)
See original GitHub issueHi 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:
- Created 7 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

go to project directory and run “npm install highcharts”
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