我一直在尝试将我的网站部署为netlify,但似乎无法正常工作。
构建脚本
npm run generate
目录
dist
错误日志:
10:08:31 PM: Build ready to start
10:08:34 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
10:08:34 PM: build-image tag: v3.3.2
10:08:34 PM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
10:08:35 PM: Fetching cached dependencies
10:08:35 PM: Starting to download cache of 152.4MB
10:08:36 PM: Finished downloading cache in 1.169011434s
10:08:36 PM: Starting to extract cache
10:08:42 PM: Finished extracting cache in 6.546647872s
10:08:42 PM: Finished fetching cache in 7.768445846s
10:08:42 PM: Starting to prepare the repo for build
10:08:43 PM: Preparing Git Reference refs/heads/master
10:08:44 PM: Starting build script
10:08:44 PM: Installing dependencies
10:08:45 PM: Started restoring cached node version
10:08:48 PM: Finished restoring cached node version
10:08:48 PM: v10.16.3 is already installed.
10:08:50 PM: Now using node v10.16.3 (npm v6.9.0)
10:08:50 PM: Attempting ruby version 2.6.2, read from environment
10:08:51 PM: Using ruby version 2.6.2
10:08:52 PM: Using PHP version 5.6
10:08:52 PM: Started restoring cached node modules
10:08:52 PM: Finished restoring cached node modules
10:08:52 PM: Installing NPM modules using NPM version 6.9.0
10:09:00 PM: npm WARN
10:09:00 PM: deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
10:09:09 PM: > yorkie@2.0.0 uninstall /opt/build/repo/node_modules/yorkie
10:09:09 PM: > node bin/uninstall.js
10:09:10 PM: husky
10:09:10 PM: uninstalling Git hooks
10:09:10 PM: done
10:09:13 PM: > nuxt@2.8.1 postinstall /opt/build/repo/node_modules/nuxt
10:09:13 PM: > opencollective || exit 0
10:09:13 PM: :-:
10:09:13 PM: .==-+:
10:09:13 PM: .==. :+- .-=-
10:09:13 PM: .==. :==++-+=.
10:09:13 PM: :==. -**: :+=.
10:09:13 PM: :+- :*+++. .++.
10:09:13 PM: :+- -*= .++: .=+.
10:09:13 PM: -+: =*- .+*: .=+:
10:09:13 PM: -+: .=*- .=*- =+:
10:09:13 PM: .==: .+*: -*- -+-
10:09:13 PM: .=+:.....:+*-.........:=*=..=*-
10:09:13 PM: .-=------=++============++====:
10:09:13 PM: Thanks for installing nuxtjs
10:09:13 PM: Please consider donating to our open collective
10:09:13 PM: to help us maintain this package.
10:09:13 PM: Number of contributors: 211
10:09:13 PM: Number of backers: 235
10:09:13 PM: Annual budget: $63,056
10:09:13 PM: Current balance: $9,193
10:09:13 PM: Donate: https://opencollective.com/nuxtjs/donate
10:09:15 PM: npm notice
10:09:15 PM: created a lockfile as package-lock.json. You should commit this file.
10:09:15 PM: npm
10:09:15 PM: WARN babel-loader@8.0.6 requires a peer of webpack@>=2 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN file-loader@3.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN html-webpack-plugin@3.2.0 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN optimize-css-assets-webpack-plugin@5.0.3 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN terser-webpack-plugin@1.3.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN thread-loader@2.1.2 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN url-loader@1.1.2 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN vue-loader@15.7.0 requires a peer of css-loader@* but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN vue-loader@15.7.0 requires a peer of webpack@^4.1.0 || ^5.0.0-0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN webpack-dev-middleware@3.7.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN webpackbar@3.2.0 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN @nuxt/friendly-errors-webpack-plugin@2.5.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN extract-css-chunks-webpack-plugin@4.6.0 requires a peer of webpack@^4.4.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN hard-source-webpack-plugin@0.13.1 requires a peer of webpack@* but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN time-fix-plugin@2.0.6 requires a peer of webpack@>=4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN style-resources-loader@1.2.1 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/fsevents):
10:09:15 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:09:15 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/chokidar/node_modules/fsevents):
10:09:15 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:09:15 PM: added 208 packages from 175 contributors, removed 655 packages, updated 1 package, moved 24 packages and audited 9566 packages in 21.999s
10:09:15 PM: found 214 high severity vulnerabilities
10:09:15 PM: run `npm audit fix` to fix them, or `npm audit` for details
10:09:15 PM: NPM modules installed
10:09:15 PM: Started restoring cached go cache
10:09:15 PM: Finished restoring cached go cache
10:09:15 PM: unset GOOS;
10:09:15 PM: unset GOARCH;
10:09:15 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
10:09:15 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:09:15 PM: go version >&2;
10:09:15 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
10:09:15 PM: go version go1.12 linux/amd64
10:09:15 PM: Installing missing commands
10:09:15 PM: Verify run directory
10:09:15 PM: Executing user command: npm run generate
10:09:16 PM: > mysite@1.0.0 generate /opt/build/repo
10:09:16 PM: > nuxt generate
10:09:17 PM: FATAL Cannot import module '@nuxt/webpack'
10:09:17 PM: at _import (node_modules/@nuxt/cli/dist/cli-chunk.js:57:17)
10:09:17 PM: at webpack (node_modules/@nuxt/cli/dist/cli-chunk.js:63:23)
10:09:17 PM: at NuxtCommand.getBuilder (node_modules/@nuxt/cli/dist/cli-chunk.js:2687:37)
10:09:17 PM: tput: No value for $TERM and no -T specified
10:09:17 PM: ╭─────────────────────────────────────────────────╮
10:09:17 PM: │ │
10:09:17 PM: │ ✖ Nuxt Fatal Error │
10:09:17 PM: │ │
10:09:17 PM: │ Error: Cannot import module '@nuxt/webpack' │
10:09:17 PM: │ │
10:09:17 PM: ╰─────────────────────────────────────────────────╯
10:09:17 PM: npm
10:09:17 PM: ERR! code ELIFECYCLE
10:09:17 PM: npm ERR!
10:09:17 PM: errno 1
10:09:17 PM: npm ERR!
10:09:17 PM: mysite@1.0.0 generate: `nuxt generate`
10:09:17 PM: npm ERR!
10:09:17 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:09:17 PM: Exit status 1
10:09:17 PM: npm
10:09:17 PM: ERR!
10:09:17 PM: npm ERR! Failed at the mysite@1.0.0 generate script.
10:09:17 PM: npm ERR!
10:09:17 PM: This is probably not a problem with npm. There is likely additional logging output above.
10:09:17 PM: npm
10:09:17 PM: ERR! A complete log of this run can be found in:
10:09:17 PM: npm ERR! /opt/buildhome/.npm/_logs/2019-08-17T20_09_17_485Z-debug.log
10:09:17 PM: Skipping functions preparation step: no functions directory set
10:09:17 PM: Caching artifacts
10:09:17 PM: Started saving node modules
10:09:17 PM: Finished saving node modules
10:09:17 PM: Started saving pip cache
10:09:17 PM: Finished saving pip cache
10:09:17 PM: Started saving emacs cask dependencies
10:09:17 PM: Finished saving emacs cask dependencies
10:09:17 PM: Started saving maven dependencies
10:09:17 PM: Finished saving maven dependencies
10:09:17 PM: Started saving boot dependencies
10:09:17 PM: Finished saving boot dependencies
10:09:17 PM: Started saving go dependencies
10:09:17 PM: Finished saving go dependencies
10:09:17 PM: Error running command: Build script returned non-zero exit code: 1
10:09:17 PM: Failing build: Failed to build site
10:09:17 PM: Finished processing build request in 42.952291008s
由于某种原因,它找不到webpack模块。
有人知道我能做什么吗?
谢谢。
答案 0 :(得分:0)
好的,我似乎已经解决了这个问题。我所做的就是执行
npm install
重新安装和更新所有软件包。之后,我上传了git所看到的更改,并将package-lock.json文件也上传到了git(因为它不存在)。然后在那之后,我使用netlify运行了部署,它现在可以工作了。
答案 1 :(得分:0)
手动删除node_modules,然后运行try {
//pls don't remove futureData since. it is required to resolve futureData of Mono..
CompletableFuture<TripInvoiceDetails> futureData = tripInvoice.toFuture();
invoice = tripInvoice.toFuture().get();
} catch (Exception e) {
e.printStackTrace();
}
,应该可以