-
Notifications
You must be signed in to change notification settings - Fork 8
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
Is the release of 1.2.0 correct? #2
Comments
What error do you get @nodepond? |
I tried to compile with @react-pdf/renderer. This is the webpack-error:
Here the complete bug-report: diegomura/react-pdf#643 |
Seems that @react-pdf is doing a custom build of fontkit since there's no fontkit.browser.es.js file in official release (1.8.0). This error occurs when trying to import a common js module using native es module import. Look at fontkit.browser.es.js and see how dfa is imported: import StateMachine from 'dfa' or var StateMachine = require('dfa') or var StateMachine = _interopDefault(require('dfa')); // like fontkit 1.8.0 The later two should work |
Cc @diegomura |
Also, dfa 1.1 and 1.2 is exporting StateMachine the same way: module.exports = StateMachine; So should not be difference regarding this issue |
Hi, |
finally i had to:
|
I have this issue too while using react-pdf. Perhaps need to add IE to the list of browsers in .babelrc In yarn.lock with it works great, instead of:
My app crashes on IE11 and it's impossible to create a build of the app with error:
Failed to compile. |
I'm having the same issue as @relightme above. App is crashing on IE11 with the same syntax error, dfa is being imported by @react-pdf/renderer. Is there a resolution for this? Thanks in advance! |
I'm also experiencing IE11 problems similar to the ones described above. Rolling back from 1.2.0 to 1.1.0 resolves the issue. I've filed #4 to make the build settings more like they were v1.1.0 and restore compatibility with older browsers. Does the code in this PR resolve the problems that folks in this thread are having? |
This dependency was failing es-check es5 check on my project. Rolling back to 1.1.0 solved it. Using #4 didn't for some reason... Got this error on the build process.
|
Also not working for me in IE11 |
@PierreAndreis What steps did you do to test with |
@rdebeasi I'm having trouble installing your branch on Windows - see below for logs:
It did work successfully on Linux, but when I check node_modules/dfa I just see README.md and package.json - no other files present |
Hello @nodepond
|
That is not a solution. |
@Parth477, thanks for sharing that tip! Unfortunately, the change that you described will only fix the problem locally. This change won't be included in source control, and the change may be lost with a subseqent If you're looking for a workaround, consider using npm-force-resolutions to keep dfa at 1.1.0. |
I have successfully added this to my
And it did fix my issue when using that |
I have an issue, when I try to install @react-pdf/renderer, read about it here: diegomura/react-pdf#643
After doing some research, I have the suspicion, that with the release of 1.2.0 maybe something went wrong. In the example above, the @render-pdf/fontkit wants to import the StateMachine from index.js of this repo in the node_modules folder. At the 1.2.0 version the compiler (i.e. webpack) complains, that it is unable to import the StateMachine correctly.
When I use the contents of the older (1.1.0) index.js from node_modules the project compiles and runs without any problems.
Can someone confirm this? Or am I doing something horrible wrong? I guess, there might be some issues in the compile-section of the 1.2.0 release.
The text was updated successfully, but these errors were encountered: