mirumee / legacy-views

A legacy fork of Saleor that contains the old storefront and dashboard code
Other
14 stars 14 forks source link

Problem with npm run build-assets #28

Open arddluma opened 4 years ago

arddluma commented 4 years ago

I tried to build assets with npm run build-assets but it doesn't work :/ Node version: v10.19.0 npm: 6.13.4 Logs:

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! saleor@0.0.0 build-assets: `webpack -p`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the saleor@0.0.0 build-assets 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:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build-assets' ]
2 info using **npm@6.13.4**
3 info using **node@v10.19.0**
4 verbose run-script [ 'prebuild-assets', 'build-assets', 'postbuild-assets' ]
5 info lifecycle saleor@0.0.0~prebuild-assets: saleor@0.0.0
6 info lifecycle saleor@0.0.0~build-assets: saleor@0.0.0
7 verbose lifecycle saleor@0.0.0~build-assets: unsafe-perm in lifecycle true
8 verbose lifecycle saleor@0.0.0~build-assets: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/saleor/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle saleor@0.0.0~build-assets: CWD: /home/ubuntu/saleor
10 silly lifecycle saleor@0.0.0~build-assets: Args: [ '-c', 'webpack -p' ]
11 silly lifecycle saleor@0.0.0~build-assets: Returned: code: 2  signal: null
12 info lifecycle saleor@0.0.0~build-assets: Failed to exec build-assets script
13 verbose stack Error: saleor@0.0.0 build-assets: `webpack -p`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid saleor@0.0.0
15 verbose cwd /home/ubuntu/saleor
16 verbose Linux 5.3.0-7625-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build-assets"
18 verbose node v10.19.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 2
22 error saleor@0.0.0 build-assets: `webpack -p`
22 error Exit status 2
23 error Failed at the saleor@0.0.0 build-assets script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
bksubhuti commented 4 years ago

me too.. not sure what it is

NyanKiyoshi commented 4 years ago

Me neither I don't see any message saying what went wrong in the ticket, which can happen.

Some things worth checking out:

  1. Deleting node_modules and reinstalling via npm i
  2. Making sure you have at least 2 GiB of RAM free, try increasing and see if it fixes the issue or not (you could monitor webpack ram usage as well to see if you are running out or not, if physically limited, you can set-up a temporary swap file)
  3. Making sure you don't have mixed user owners in the files, for example cloned using root/normal user, then ran npm i as root, etc. that would cause having permission issues, quick fix could be chown -R your-normal-user /path/where/saleor/is