primary module does not work on the server
See original GitHub issueThe primary module referred to by main will not run on the server due to its reference to document.
I am building a universal application using Nuxt.js and this caused problems for us.
I am able to work around this by using an alias to re-point vue-svgicon at the source itself, which does not have any references to document.
This code seems perfectly capable of running in both environments. Looking at the build for this project I am not able to understand why webpack is adding references to document at all. I’m not sure what feature it is trying to provide for the library by doing so.
Please let me know if I can help further.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Javascript module not working in browser? - Stack Overflow
Open a terminal. (On Windows: cmd.exe .) · Type npm and hit Enter to see if Node.js is installed. · Install live-server: npm...
Read more >The specified module 'Module Name' was not loaded because ...
This error is because the PowerShell console or ISE is unable to get the module from given module path's in the environment variable...
Read more >Storybook cannot be built on packages using "type": "module"
I'm not able to get this working with CRA. Node v12.18.4; @storybook/react v6.0.22; "type": "module" in package.json; renamed main ...
Read more >Troubleshooting Management Module connectivity issues - IBM
How to troubleshoot management module connectivity issues.
Read more >Powershell broke - basic commands not working, not loading ...
Hi, Check if $env:PSModulePath contains C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1. 0\Modules. If not, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Ca4tkin
config.resolve.alias['vue-svgicon$'] = 'vue-svgicon/component/svgicon.vue';is what I am using inextend(config).@corsen2000 , could you explain in detail how to make it work with Nuxt? Which alias should be changed?