React页面在Ubuntu上无法加载,但在本地WSL上可以加载。

huangapple go评论69阅读模式
英文:

react page doesn't load on ubuntu but does on local wsl

问题

I'm having a strange issue where code that works perfectly on my local and runs without any issues doesn't work on an ubuntu server

When running npm start, my local shows "Compiled successfully!" while the server shows "Compiled with warnings." and a whole laundry list of issues

The console of my local shows nothing, no errors. The server shows all of the following errors:
React页面在Ubuntu上无法加载,但在本地WSL上可以加载。

None of these errors are present on my local

Things I've tried:

  1. I made sure both node versions were on their latest (18.x)
  2. All packages are up to date and installed

I'm simply lost as to what the solution would be

英文:

I'm having a strange issue where code that works perfectly on my local and runs without any issues doesn't work on an ubuntu server

When running npm start, my local shows "Compiled successfully!" while the server shows "Compiled with warnings." and a whole laundry list of issues

The console of my local shows nothing, no errors. The server shows all of the following errors:
React页面在Ubuntu上无法加载,但在本地WSL上可以加载。

None of these errors are present on my local

Things I've tried:

  1. I made sure both node versions were on their latest (18.x)
  2. All packages are up to date and installed

I'm simply lost as to what the solution would be

答案1

得分: 0

Turns out I forgot to install the styled-components library when the program is entirely made up of styled components, in addition to updating npm :facepalm:

英文:

Turns out I forgot to install the styled-components library when the program is entirely made up of styled components, in addition to updating npm :facepalm:

huangapple
  • 本文由 发表于 2023年3月12日 09:47:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/75710642.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定