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

importing auth0 breaks universal #32

Closed
ghost opened this issue Jul 10, 2017 · 2 comments
Closed

importing auth0 breaks universal #32

ghost opened this issue Jul 10, 2017 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 10, 2017

I'm submitting a ... (check one with "x")

[ ] bug report => check the README and search github for a similar issue or PR before submitting
[x] support request => check the README and search github for a similar issue or PR before submitting
[ ] feature request

After importing auth0-js in a component I'm receiving the following error after building and serving via express. SPA mode works fine however.

Import:
import auth0 from 'auth0-js';
Run:
npm run build:universal-dev
npm run serve
Error:

/.server/server.js:134432
var crypto = require('crypto');
             ^
TypeError: require is not a function

@ghost ghost changed the title importing auth0 breaks universal Importing auth0 breaks universal Jul 10, 2017
@fulls1z3 fulls1z3 self-assigned this Jul 15, 2017
@fulls1z3 fulls1z3 changed the title Importing auth0 breaks universal [question] importing auth0 breaks universal Jul 15, 2017
@fulls1z3
Copy link
Owner

@vanaio it seems like an issue with module resolution. Is it possible for you to share a codepen url, or upload to a repository on github (so that we'll be able to reproduce the issue and see what's wrong)?

@artemsoliar
Copy link

I'm trying to use a preboot js to help manage the transition of state , and I understand require is ignored in source code below (inline.preboot.code.ts)

const eventRecorderFn = opts.minify ?
  require('../../dist/preboot.min.js') :
  require('../../dist/preboot.js');

@fulls1z3 fulls1z3 closed this as completed Aug 2, 2017
@fulls1z3 fulls1z3 removed their assignment Aug 10, 2017
@fulls1z3 fulls1z3 changed the title [question] importing auth0 breaks universal importing auth0 breaks universal Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants