0

试图在 ubuntu 上安装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或通过进入目录并右键单击>删除/移动到垃圾箱手动删除它。另外,也删除 package-lock.json 文件。

第 3 步:npm install

重新开始,$ npm start

但没有帮助。

节点版本:v12.16.3 NPM 版本:6.14.4 nginx 版本:nginx/1.14.0 (Ubuntu)

当我在本地安装它时,它运行良好,没有问题

4

2 回答 2

0

对于任何试图解决这个问题的人 - 我的解决方案是增加内存大小我在 ubuntu 18.04x64 droplet 上运行1GB RAM 。但是在将其增加到4GB RAM之后。一切都没有错误。

另一种解决方案可能是将“npm run build-assets”拆分为需要低内存系统的较小步骤。

于 2020-05-10T15:08:19.247 回答
0

通过您的笔记本电脑构建它,然后部署到远程服务器。

https://github.com/mirumee/saleor-storefront/issues/654#issuecomment-601150996

...但我会说您应该在本地编译所有内容npm run build,然后将dist目录推送到 Heroku 并从那里提供应用程序。

于 2021-07-23T09:42:45.580 回答