Javascript 当我';我正在处理包裹

Javascript 当我';我正在处理包裹,javascript,npm,serverless-framework,serverless,parcel,Javascript,Npm,Serverless Framework,Serverless,Parcel,我在一个网站上工作了一段时间,我使用的是无服务器。 一切都进行得很顺利,但从今天早上开始,我无法将我的更新从我的站点推送到无服务器的站点。 通过推,我犯了这个错误: Error: Failed building website via "npm run build" due to the following error: "npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! website@0.1.0 build: `parcel bui

我在一个网站上工作了一段时间,我使用的是无服务器。 一切都进行得很顺利,但从今天早上开始,我无法将我的更新从我的站点推送到无服务器的站点。 通过推,我犯了这个错误:

    Error: Failed building website via "npm run build" due to the following error: "npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! website@0.1.0 build: `parcel build index.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the website@0.1.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!     /Users/maxime/.npm/_logs/2019-12-04T15_03_19_978Z-debug.log
"
_日志的错误是:

   0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle website@0.1.0~prebuild: website@0.1.0
6 info lifecycle website@0.1.0~build: website@0.1.0
7 verbose lifecycle website@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle website@0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/maxime/Documents/website copie/node_modules/.bin:/Users/maxime/Library/Python/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/maxime/Library/Python/3.7/bin:/Users/maxime/anaconda3/bin:/Users/maxime/anaconda3/condabin
9 verbose lifecycle website@0.1.0~build: CWD: /Users/maxime/Documents/website copie
10 silly lifecycle website@0.1.0~build: Args: [ '-c', 'parcel build index.html' ]
11 silly lifecycle website@0.1.0~build: Returned: code: 1  signal: null
12 info lifecycle website@0.1.0~build: Failed to exec build script
13 verbose stack Error: website@0.1.0 build: `parcel build index.html`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
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: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 website@0.1.0
15 verbose cwd /Users/maxime/Documents/website copie
16 verbose Darwin 18.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v10.16.3
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error website@0.1.0 build: `parcel build index.html`
22 error Exit status 1
23 error Failed at the website@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

所以我在@Andrewlohr的帮助下发现了错误

Npm表示停止工作的线路。对我来说,它是
packetbuildindex.html

为了获得更多关于为什么
packetbuildindex.html
不起作用的详细信息,我只需在控制台中运行命令行,而不使用npm

~/D/website copie>packet build index.html

你的package.json看起来像什么?@AndrewLohr我现在问你我的问题是my package.json谢谢,所以显然它在命令
package build index.html
上失败了,如果你自己运行该命令(而不是执行npm run build),你会得到更清晰的错误消息吗?“我只是想尝试一下。”安德烈·洛赫,天哪,是的。它起作用了。我忘记了css中的“样式”和“packetbuildindex.html”告诉我正确的错误。你可以把你的建议写在“答案”中进行验证。你找到了答案,我刚刚帮了你:)你应该用所有相关信息回答你自己的问题,以便将来帮助其他人解决同样的问题。此外,我还将更新标题以包含单词
packet
,因为这是您遇到问题的工具。
  {
  "name": "website",
  "version": "0.1.0",
  "description": "",
  "scripts": {
    "start": "parcel index.html",
    "build": "parcel build index.html"
  },
  "license": "MIT",
  "dependencies": {
    "@material-ui/core": "^4.6.0",
    "axios": "^0.19.0",
    "browserify-fs": "^1.0.0",
    "chart.js": "^2.9.2",
    "express-basic-auth": "^1.2.0",
    "material-expansion-panel": "^1.0.0",
    "moment": "^2.24.0",
    "react": "^16.11.0",
    "react-chartjs-2": "^2.7.6",
    "react-dom": "^16.11.0",
    "react-grid-system": "^6.0.3",
    "react-history": "^0.18.2",
    "react-hook-form": "^3.27.0",
    "react-js-snackbar": "^1.0.4",
    "react-navigation": "^4.0.10",
    "react-router-dom": "^5.1.2",
    "react-skylight": "^0.5.1",
    "react-tabs": "^3.0.0",
    "react-tooltip": "^3.11.1",
    "reactstrap": "^8.1.1",
    "styled-components": "^4.4.1"
  },
  "devDependencies": {
    "@babel/core": "^7.7.2",
    "babel-preset-nano-react-app": "^0.1.0",
    "parcel-bundler": "^1.11.0",
    "parcel-plugin-clean-dist": "0.0.6"
  },
  "babel": {
    "presets": [
      "nano-react-app"
    ],
    "plugins": [
      [
        "@babel/plugin-proposal-class-properties",
        {
          "loose": true
        }
      ],
      [
        "@babel/plugin-transform-react-jsx",
        {
          "pragmaFrag": "React.Fragment"
        }
      ]
    ]
  }
}