Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js docker生成错误SyntaxError:意外标记_Node.js_Docker_Npm - Fatal编程技术网

Node.js docker生成错误SyntaxError:意外标记

Node.js docker生成错误SyntaxError:意外标记,node.js,docker,npm,Node.js,Docker,Npm,docker在我尝试构建时给了我一个错误 /usr/src/app/node_modules/@nuxt/cli/dist/cli-index.js:602 } catch { } ^ SyntaxError: Unexpected token { at new Script (vm.js:51:7) at createScript (vm.js:136:10) at Object.runInThisContext (vm.js:197:10)

docker在我尝试构建时给了我一个错误

/usr/src/app/node_modules/@nuxt/cli/dist/cli-index.js:602
  } catch { }
          ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@1.0.0 build: `nuxt build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@1.0.0 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!     /root/.npm/_logs/2021-04-27T06_59_56_525Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1

我不知道问题出在哪里,也找不到日志文件,我正在使用windows。

我将从发布您的Dockerfile开始