小编AV8*_*V8R的帖子

React 构建在本地运行,但在 Amplify 上失败

有什么想法或者如何在不重新开始的情况下调试它吗?在 API、GraphQL 和 CI 上投入了大量时间。

\n

这是一个普通的 create-react-app,在 App.js 中进行了一些细微的更改。使用节点 12.18.3 和 npm 6.14.8 在本地启动和构建。使用 npm@6.9.0 和 node@v10.16.0 进行 Amplify 构建失败。

\n

我试图避免使用自定义 Docker 映像来升级节点和 npm。

\n

编辑以添加 index.js - 构建日志来自尝试将 .js 附加到 ./App 导入

\n

索引.js

\n
import ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(\n  <React.StrictMode>  \n    <App />\n  </React.StrictMode>,\n  document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some …
Run Code Online (Sandbox Code Playgroud)

npm reactjs npm-scripts aws-amplify

5
推荐指数
1
解决办法
3426
查看次数

标签 统计

aws-amplify ×1

npm ×1

npm-scripts ×1

reactjs ×1