I’ve been trying to get my site to deploy to netlify but it does not seem to be working.
Build script
npm run generate
Directory
dist
Error log:
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 [email protected]: I wrote this module a very long time ago; you should use something else.
10:09:09 PM: > [email protected] 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: > [email protected] 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 [email protected] requires a peer of webpack@>=2 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] 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 [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] 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 [email protected] 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 [email protected] requires a peer of css-loader@* but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] 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 [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] 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/[email protected] 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 [email protected] requires a peer of webpack@^4.4.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] requires a peer of webpack@* but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] requires a peer of webpack@>=4.0.0 but none is installed. You must install peer dependencies yourself.
10:09:15 PM: npm WARN [email protected] 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: [email protected] (node_modules/fsevents):
10:09:15 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:09:15 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
10:09:15 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: 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: > [email protected] 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: [email protected] 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 [email protected] 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
For some reason it cannot find the webpack module.
Does anyone have any idea what i can do?
Thank you in advance.
2
Answers
Alright I've seemed to have solved the issue. What i've done is execute
To reinstall and update all packages. After that i uploaded what git saw as changes and uploaded the package-lock.json file to git aswell (as it wasn't there). Then after that i ran the deploy with netlify and it works now.
Delete node_modules manually, and then run
npm install
, that should work