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

Impossible to use Orejime as ES6 module #8

Closed
ambroisemaupate opened this issue Mar 29, 2019 · 11 comments
Closed

Impossible to use Orejime as ES6 module #8

ambroisemaupate opened this issue Mar 29, 2019 · 11 comments
Labels
bug Something isn't working

Comments

@ambroisemaupate
Copy link

yarn add orejime
import * as Orejime from 'orejime'
import orejimeConfig from './config/orejimeConfig'

…

Orejime.init(orejimeConfig)

This give us many linking errors

ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './de.yml' in 
ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './en.yml' in 
ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './fr.yml' in 
ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './hu.yml' in 
ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './it.yml' in 
ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './nb.yml' in 
ERROR in ../node_modules/orejime/es/translations/index.js
Module not found: Error: Can't resolve './ro.yml' in 
ERROR in ../node_modules/orejime/es/orejime.js
Module not found: Error: Can't resolve 'react' in
ERROR in ../node_modules/orejime/es/components/main.js
Module not found: Error: Can't resolve 'react' in 

ERROR in ../node_modules/orejime/es/components/consent-notice.js
ERROR in ../node_modules/orejime/es/components/consent-modal.js
ERROR in ../node_modules/orejime/es/components/icons.js
ERROR in ../node_modules/orejime/es/components/apps.js
ERROR in ../node_modules/orejime/es/components/dialog.js
ERROR in ../node_modules/orejime/es/components/app-item.js
ERROR in ../node_modules/orejime/es/utils/useLegacyLifecycleMethods.js
ERROR in ../node_modules/react-modal/lib/components/Modal.js
ERROR in ../node_modules/react-modal/lib/components/ModalPortal.js
ERROR in ../node_modules/orejime/es/orejime.js
ERROR in ../node_modules/react-modal/lib/components/Modal.js

It seems that your NPM package dropped any sources and translation files, then you dependencies are not available peerDependencies, devDependencies.

@manuhabitela
Copy link
Contributor

Oh well, what was I thinking?

Thanks for letting me know, sorry. I'll make a fix soon so that Orejime works without the absolute need to use webpack and a way to load yml files.

@manuhabitela manuhabitela added the bug Something isn't working label Apr 3, 2019
@ambroisemaupate
Copy link
Author

ambroisemaupate commented Apr 5, 2019

We began a fork to improve Webpack compatibility and UI. Feel free to check it :
https://github.com/Gouterman/orejime

We lightened the package by dropping jQuery UI for modals.

@ambroisemaupate
Copy link
Author

image

image

@manuhabitela
Copy link
Contributor

manuhabitela commented Apr 5, 2019

Hey, great :)

From my side, master is up with changes for Orejime to finally work correctly in a module context (see ad1d739 and f5362d4), so it should be good in the next release.

@manuhabitela
Copy link
Contributor

We lightened the package by dropping jQuery UI for modals.

I figure you mean React Modal. For a11y's sake, I'd rather rely on React Modal at the cost of a little more code in the built files.

@ambroisemaupate
Copy link
Author

@Gouterman what do you think about it? Do we still support accessibility standards after dropping React Modal?

@manuhabitela
Copy link
Contributor

This should now be fixed in version 1.1.0, thanks.

@ambroisemaupate
Copy link
Author

Hi @Leimi

Thanks for this update !
I think NPMJS and unpkg.com repositories are not in sync yet. I’ll check again tomorrow if v1.1.0 is available there.

@manuhabitela
Copy link
Contributor

Oh well there seem to be an issue with npm... 1.1.0 is not on npm yet, I'll let you know.

@manuhabitela
Copy link
Contributor

Hey, the version 1.1.1 is published, for real this time.

@ambroisemaupate
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants