Error during deploying VueJS app to Firebase - 'FATAL: file does not exist' and 'ERROR: Job failed: exit code 1'

时间:2019-01-09 21:57:00

标签: firebase vue.js npm deployment gitlab

I have a VueJS web application and I would like to deploy it to Firebase. Previously I could do it, but now it doesn't seem to be working. Can you please help me with this issue?

I tried updating my node modules and npm version(6.5.0).

I have not idea what file could me missing.

This is my firebase.json:

{
  "hosting": {
    "public": "dist",
    "ignore": [
        "firebase.json",
        "**/.*",
        "**/node-modules/**"
    ],
    "rewrites": [
        {
            "source": "**",
            "destination": "/index.html"
        }
    ]
  }
}

And my .gitlab-ci.yml:

image: node:alpine
cache:
  paths:
    - node modules/

deploy production:
  stage: deploy
  environment: Production
  only:
    - master
  script:
    - npm install
    - npm i -g firebase-tools
    - npm run build
    - firebase deploy --non-interactive --token "1/mMKXEO51btxlLi1WFA0DCk3rTydQExwD4r3ks5OvSRXUdjfZB8tbThwqyVAOZKqY"

This is the error I am getting on GitLab:

  on docker-auto-scale 72989761
Using Docker executor with image node:alpine ...
Pulling docker image node:alpine ...
Using docker image sha256:9036ebdbc59d6cd302245606347dcea506a7b7ebee6c54bdadd204dd7fc839d2 for node:alpine ...
Running on runner-72989761-project-6835676-concurrent-0 via runner-72989761-srm-1547069869-13619248...
Cloning repository...
Cloning into '/builds/MacRayy/blind-media-website'...
Checking out 0975e760 as master...
Skipping Git submodules setup
Checking cache for default...
FATAL: file does not exist                         
Failed to extract cache
$ npm install

> node-sass@4.11.0 install /builds/MacRayy/blind-media-website/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/linux_musl-x64-67_binding.node
Download complete
Binary saved to /builds/MacRayy/blind-media-website/node_modules/node-sass/vendor/linux_musl-x64-67/binding.node
Caching binary to /root/.npm/node-sass/4.11.0/linux_musl-x64-67_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall /builds/MacRayy/blind-media-website/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> node-sass@4.11.0 postinstall /builds/MacRayy/blind-media-website/node_modules/node-sass
> node scripts/build.js

Binary found at /builds/MacRayy/blind-media-website/node_modules/node-sass/vendor/linux_musl-x64-67/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1322 packages from 734 contributors and audited 9805 packages in 27.617s
found 4 vulnerabilities (1 moderate, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details
$ npm i -g firebase-tools
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js

> @google-cloud/functions-emulator@1.0.0-beta.5 postinstall /usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator
> node scripts/upgrade-warning


If you're using the Emulator via the Firebase CLI, you can
disregard this message.

If you're upgrading @google-cloud/functions-emulator, these
are the recommended upgrade steps:

1.  Stop the currently running emulator, if any:

        functions stop

2.  Uninstall the current emulator, if any:

        npm uninstall -g @google-cloud/functions-emulator

3.  Install the new version of the emulator:

        npm install -g @google-cloud/functions-emulator

If you have trouble after upgrading, try deleting the config
directory found in:

    ~/.config/configstore/@google-cloud/functions-emulator

Then restart the emulator. You can also check for any renegade
Node.js emulator processes that may need to be killed:

    ps aux | grep node

+ firebase-tools@6.2.2
added 537 packages from 268 contributors in 28.294s
$ npm run build

> blind-media-website@1.0.0 build /builds/MacRayy/blind-media-website
> node build/build.js


To use this template, you must update following to modules:

  npm: 6.5.0-next.0 should be >= 3.0.0

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! blind-media-website@1.0.0 build: `node build/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the blind-media-website@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/2019-01-09T21_39_55_440Z-debug.log
ERROR: Job failed: exit code 1```


0 个答案:

没有答案