Title: Require.js problem
Last modified: August 24, 2016

---

# Require.js problem

 *  [motard](https://wordpress.org/support/users/motard/)
 * (@motard)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/requirejs-problem/)
 * Hello guys.
 * I am creating a theme based on a design made by others. And i need to use require.
   js
 * I have loaded the require.js file like this : `wp_enqueue_script( 'require.js',
   get_template_directory_uri() . '/js/require.js', array('jquery') );`
 * and then load my initial js file like so: `wp_enqueue_script( 'my_script.js',
   get_template_directory_uri() . '/js/home.js', array('jquery') );`
 * My home.js only have this: `var global = require('includes/global.js');`
 * The result is
 * > Uncaught Error: Module name “includes/global.js” has not been loaded yet for
   > context: _. Use require([])
 * My question is how can I load this global.js? Maybe I am doing lots of things
   wrong but I am still learning.
 * Any help would be greatly appreciated. Thx

The topic ‘Require.js problem’ is closed to new replies.

## Tags

 * [requirejs](https://wordpress.org/support/topic-tag/requirejs/)

 * 0 replies
 * 1 participant
 * Last reply from: [motard](https://wordpress.org/support/users/motard/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/requirejs-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
