SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/fox/hashlips_art_engine/index.js:2:39)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hashlips_art_engine@1.1.1 build: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashlips_art_engine@1.1.1 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! /home/fox/.npm/_logs/2022-07-06T11_24_38_964Z-debug.log
debug.log:
x
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@6.14.4
3 info using node@v10.19.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle hashlips_art_engine@1.1.1~prebuild: hashlips_art_engine@1.1.1
6 info lifecycle hashlips_art_engine@1.1.1~build: hashlips_art_engine@1.1.1
7 verbose lifecycle hashlips_art_engine@1.1.1~build: unsafe-perm in lifecycle true
8 verbose lifecycle hashlips_art_engine@1.1.1~build: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/fox/hashlips_art_engine/node_modules/.bin:/usr/local/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/fox/go/bin:/home/fox/hyperledger/fabric-samples/bin:/usr/local/go/bin:/home/fox/go/bin
9 verbose lifecycle hashlips_art_engine@1.1.1~build: CWD: /home/fox/hashlips_art_engine
10 silly lifecycle hashlips_art_engine@1.1.1~build: Args: [ '-c', 'node index.js' ]
11 silly lifecycle hashlips_art_engine@1.1.1~build: Returned: code: 1 signal: null
12 info lifecycle hashlips_art_engine@1.1.1~build: Failed to exec build script
13 verbose stack Error: hashlips_art_engine@1.1.1 build: node index.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/usr/share/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 hashlips_art_engine@1.1.1
15 verbose cwd /home/fox/hashlips_art_engine
16 verbose Linux 5.13.0-37-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error hashlips_art_engine@1.1.1 build: node index.js
22 error Exit status 1
23 error Failed at the hashlips_art_engine@1.1.1 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
when run "npm run build", there are errors, what should I do?
$ npm run build
/home/fox/hashlips_art_engine/src/main.js:94 layerObj.options?.["displayName"] != undefined ^
SyntaxError: Unexpected token . at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/fox/hashlips_art_engine/index.js:2:39)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hashlips_art_engine@1.1.1 build:
node index.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hashlips_art_engine@1.1.1 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! /home/fox/.npm/_logs/2022-07-06T11_24_38_964Z-debug.log
debug.log: x 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ] 2 info using npm@6.14.4 3 info using node@v10.19.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle hashlips_art_engine@1.1.1~prebuild: hashlips_art_engine@1.1.1 6 info lifecycle hashlips_art_engine@1.1.1~build: hashlips_art_engine@1.1.1 7 verbose lifecycle hashlips_art_engine@1.1.1~build: unsafe-perm in lifecycle true 8 verbose lifecycle hashlips_art_engine@1.1.1~build: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/fox/hashlips_art_engine/node_modules/.bin:/usr/local/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/fox/go/bin:/home/fox/hyperledger/fabric-samples/bin:/usr/local/go/bin:/home/fox/go/bin 9 verbose lifecycle hashlips_art_engine@1.1.1~build: CWD: /home/fox/hashlips_art_engine 10 silly lifecycle hashlips_art_engine@1.1.1~build: Args: [ '-c', 'node index.js' ] 11 silly lifecycle hashlips_art_engine@1.1.1~build: Returned: code: 1 signal: null 12 info lifecycle hashlips_art_engine@1.1.1~build: Failed to exec build script 13 verbose stack Error: hashlips_art_engine@1.1.1 build: (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/usr/share/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 hashlips_art_engine@1.1.1
15 verbose cwd /home/fox/hashlips_art_engine
16 verbose Linux 5.13.0-37-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error hashlips_art_engine@1.1.1 build:
node index.js
13 verbose stack Exit status 1 13 verbose stack at EventEmitter.node index.js
22 error Exit status 1 23 error Failed at the hashlips_art_engine@1.1.1 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]