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

Missing build folder #124

Open
oscarml opened this issue Sep 18, 2018 · 4 comments
Open

Missing build folder #124

oscarml opened this issue Sep 18, 2018 · 4 comments

Comments

@oscarml
Copy link

oscarml commented Sep 18, 2018

Hi,
I'm using using polyglot in my project for a year (I installed it with npm)

Today, I've run a npm update, and I can't find the folder node_modules/node-polyglot/build, and it was before (I use require optimizer and I included node_modules/node-polyglot/build/polyglot.min.js)

Should npm download and build that folder automatically?
Do you have any idea of what's going on?

Thanks

@ljharb
Copy link
Collaborator

ljharb commented Sep 21, 2018

This was done in a5684b5 - those build files were very VERY out of date, and shouldn't be used.

v0.4.3 was the last version that updated these files, in eec8d15.

If absolutely necessary, I can revert, and keep them around, but I'd strongly suggest you use the normal module, and not use the pre-built file at all.

@oscarml
Copy link
Author

oscarml commented Sep 21, 2018

Hi, thanks for answering.
So, I should use index.js file?
I've done that, and I get a RequireJS related error:
Uncaught Error: Module name "for-each" has not been loaded yet for context: _. Use require([])

Thanks

@ljharb
Copy link
Collaborator

ljharb commented Sep 21, 2018

You should use npm install, and require('node-polyglot'). You should then be using a module bundler like browserify or webpack to bundle up the things you need.

If you're using AMD, then you'll need to configure your bundler to produce AMD.

@ljharb
Copy link
Collaborator

ljharb commented Sep 21, 2018

(Note that you can always switch to v0.4.3 of the package, which will restore the same ancient version you've been using via the built file)

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

2 participants