Error Compiling new theme

412 views
Skip to first unread message

JDancause

unread,
Feb 3, 2021, 11:27:36 AM2/3/21
to XMPie Interest Group
I am trying to compile a theme to test into a live demo store.
When I run the commande 

npm run publish -- name=testTheme displayName='testTheme'


The process fail to complet.

That is what I got 


deleting out directory
deleting .next directory
change next.dev.config.js assetPrefix value to theme name
change package.json customization section from variables.scss
exporting library
executing command npm run export
(node:33915) UnhandledPromiseRejectionWarning: Error: Command failed: npm run export
Failed to compile.

static/QEcy6e30HFu6tUbBUih_l/pages/generic.js from UglifyJs
Unexpected token: name «CryptoJS», expected: punc «;» [static/QEcy6e30HFu6tUbBUih_l/pages/generic.js:6573,4]

> Build error occurred
Error: > Build failed because of webpack errors
    at build (/Users/sandrinelaurendeau/Documents/DEV_themes/mega/brandsource_v3_eng_2/src/node_modules/next/dist/build/index.js:9:861)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! brandsour...@1.0.0 client_only:build: `cross-env DEPLOY_ENV=publish  BUILD_TYPE=client_only next build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the brandsour...@1.0.0 client_only:build 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:
npm ERR!     /Users/sandrinelaurendeau/.npm/_logs/2021-02-03T16_17_35_320Z-debug.log
ERROR: "client_only:build" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! brandsour...@1.0.0 export: `npm-run-all --sequential client_only:build client_only:export  `
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the brandsour...@1.0.0 export 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:
npm ERR!     /Users/sandrinelaurendeau/.npm/_logs/2021-02-03T16_17_35_342Z-debug.log

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:658:12)
(node:33915) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:33915) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.




and this is the log 

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'export' ]
2 info using n...@6.12.0
3 info using no...@v12.13.0
4 verbose run-script [ 'preexport', 'export', 'postexport' ]
5 info lifecycle brandsour...@1.0.0~preexport: brandsour...@1.0.0
6 info lifecycle brandsour...@1.0.0~export: brandsour...@1.0.0
7 verbose lifecycle brandsour...@1.0.0~export: unsafe-perm in lifecycle true
8 verbose lifecycle brandsour...@1.0.0~export: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/sandrinelaurendeau/Documents/DEV_themes/mega/brandsource_v3_eng_2/src/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/sandrinelaurendeau/Documents/DEV_themes/mega/brandsource_v3_eng_2/src/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle brandsour...@1.0.0~export: CWD: /Users/sandrinelaurendeau/Documents/DEV_themes/mega/brandsource_v3_eng_2/src
10 silly lifecycle brandsour...@1.0.0~export: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'npm-run-all --sequential client_only:build client_only:export '
10 silly lifecycle ]
11 silly lifecycle brandsour...@1.0.0~export: Returned: code: 1 signal: null
12 info lifecycle brandsour...@1.0.0~export: Failed to exec export script
13 verbose stack Error: brandsour...@1.0.0 export: `npm-run-all --sequential client_only:build client_only:export `
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:210:5)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:210:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid brandsour...@1.0.0
15 verbose cwd /Users/sandrinelaurendeau/Documents/DEV_themes/mega/brandsource_v3_eng_2/src
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "export"
18 verbose node v12.13.0
19 verbose npm v6.12.0
20 error code ELIFECYCLE
21 error errno 1
22 error brandsour...@1.0.0 export: `npm-run-all --sequential client_only:build client_only:export `
22 error Exit status 1
23 error Failed at the brandsour...@1.0.0 export script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]



couch

unread,
Feb 7, 2021, 7:04:53 PM2/7/21
to XMPie Interest Group
Only thing I can suggest is to check that you are using the right node.js version for your installed uStore version:

Other than that, it is best to work with XMPie support via Webex to investigate the setup of your development environment.

Reply all
Reply to author
Forward
0 new messages