试图在ubuntu上安装saleor saleor。
跑后
npm开始获取以下错误
npm start
> saleor-site@2.10.0-rc.1 start /home/nsola/storefront
> cross-env NODE_ENV=develop webpack-dev-server --history-api-fallback --watch --port 3000 --mode development --hotOnly
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: 404s will fallback to /index.html
ℹ 「wdm」: wait until bundle finished: /
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! saleor-site@2.10.0-rc.1 start: `cross-env NODE_ENV=develop webpack-dev-server --history-api-fallback --watch --port 3000 --mode development --hotOnly`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the saleor-site@2.10.0-rc.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:已尝试:步骤1:$ npm cache clean --force
步骤2:按node_modules文件夹删除$ rm -rf node_modules package-lock.json或手动删除它,方法是进入目录并右击> Delete /移动到回收站。另外,也要删除package-lock.json文件。
步骤3:npm install
要重新开始,$ npm start
但没有帮上忙。
节点版本: v12.16.3 NPM版本: 6.14.4 nginx版本: nginx/1.14.0 (Ubuntu)
当我在本地安装它时,它运行良好,没有任何问题。
发布于 2020-05-10 15:08:19
对于任何试图解决这个问题的人,我的解决方案是增加内存大小。我在我的ubuntu18.04x64液滴上运行了1GBRAM。但是在把它增加到之后,4GB内存。一切都没有出错。
另一种解决方案可能是将"npm运行构建资产“拆分为需要低内存系统的较小步骤。
发布于 2021-07-23 09:42:45
通过您的笔记本电脑构建它,然后部署到远程服务器。
https://github.com/mirumee/saleor-storefront/issues/654#issuecomment-601150996
...但是我想说的是,您应该使用
npm run build在本地编译所有内容,然后将dist目录推到Heroku,然后从那里为应用程序提供服务。
https://stackoverflow.com/questions/61688309
复制相似问题