Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: require is not a function #597

Open
jensenv opened this issue Apr 9, 2018 · 0 comments
Open

TypeError: require is not a function #597

jensenv opened this issue Apr 9, 2018 · 0 comments

Comments

@jensenv
Copy link

jensenv commented Apr 9, 2018

Trying to get the demo up and running in an Angular 5.5.1 environment with Angular CLI 1.7.4 handling builds.

It builds fine, but when I run, I get a run-time error of

Uncaught TypeError: require is not a function
at ng2-table.js:5

I tried adding require.js to my angular-cli.json 'scripts' section but it didn't help:

"scripts": [
"../../node_modules/ng2-table/ng2-table.js",
"../../node_modules/requirejs/require.js"
],

What am I missing here? Does requirejs need to be included in my app.module.ts somewhere? Don't know as much about Node.js as I'd like...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant