Currently I am learning react, trying to create react app, when I try to run "npx parcel index.html" I am getting following error

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

Currently I am learning react, trying to create react app, when I try to run "npx parcel index.html" I am getting following error

问题

我遇到了这个错误,请告诉我我哪里出错了。

当我尝试运行命令:npx parcel index.html 时,它会说你是否想说 App.js,如果我把它写成 App.js,它将忽略我的项目中的 HTML 文件。

英文:

enter image description here
I am getting this error please tell me where I goes wrong

when I try to run command: npx parcel index.html it says are you meant to say App.js if I put it like App.js it will ignore html file of my project

答案1

得分: 2

错误提示表明你的 app.js 文件无法在 ./src 文件夹内找到,如图中所示。请将你的导入路径从 ./src/App.js 更改为 ./App.js。

英文:

The error is suggesting that your app.js file could not be located inside the ./src folder inside index.The folder is unavailable as seen in the image. Please change your import from ./src/App.js to ./App.js

huangapple
  • 本文由 发表于 2023年6月29日 13:35:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76578295.html
匿名

发表评论

匿名网友

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

确定