Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

401
Views
Module 'myApp' is not available in AngularJS with Webpack

I'm new to AngularJS. Instead of using script tags for dependency imports, I have installed the dependency using npm and then bundled it into one file using Webpack and I have imported that only. But I'm seeing this error.

bundle.js:2 Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.4.4/$injector/nomod?p0=myApp

It seems angularjs is somehow unable to locate myApp module. See my code below.

app.js

'use strict';
import angular from 'angular';
angular.module( 'myApp', []);

index.js for bundling using webpack(these dependencies are installed using npm)

import 'angular';
import 'angular-route';
    
import './app/app.js';

index.html

<!DOCTYPE html >
<html lang="en" ng-app="myApp">

<head>
  <title>My App</title>
</head>

<body>
  ...

  <!-- Angular -->
  <script src="dist/bundle.js"></script>

</body>

</html>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!