menu

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

Channels
Team

You defined 1 build that did not match any source files (please ensure they are…

February 19, 2019 at 7:42pm

You defined 1 build that did not match any source files (please ensure they are NOT defined in

February 19, 2019 at 7:42pm

What does this error mean and how to fix it?

my now.json:

{
"version": 2,
"public": true,
"builds": [
{
"src": "package.json",
"use": "@now/static-build",
"config": {
"distDir": "build"
}
}
]
}

my .nowignore file:

node_modules
build
backend
tests
elm-stuff

And now-build in my package.json:

"now-build": "NODE_ENV=production elm-app build",

February 19, 2019 at 7:43pm

Can you give me a tree of your project folder?

  • reply
  • like

Ist this good enough? Basically it's a fresh create-elm-app with no modifications yet, trying to get a deployment working first and starting to code after that... maybe

  • reply
  • like
  • reply
  • like

Sounds fine to me. Can you give me the content of .nowignore?

  • reply
  • like
node_modules
build
backend
tests
elm-stuff
  • reply
  • like

that is really weird. What is the version of your CLI>

  • reply
  • like

Just upgraded, because I had some other random issues that people suggested to upgrade.

now --version 5.1.0

  • reply
  • like

Or is that an old one...

  • reply
  • like

5.1.0? Are you sure?

  • reply
  • like

Give me a screenshot of it

  • reply
  • like

Now I actually get > Error! Unexpected error. Please try later. (Unexpected response)

  • reply
  • like

The latest version is 14.X.X

  • reply
  • like

I am shocked about that version...

Edited
  • reply
  • like

me too. That's weird. I somehow managed to screw it up. I tried on a different laptop where I have version 14.0.0 but still the same error

  • reply
  • like

Oh, wait it works on the other laptop if I only run now maybe running now --public ./build --local-config=../now.json && now alias --local-config=./now.json is not a good idea

  • reply
  • like

I guess it was the ./build in combination with an ancient now version that was the problem

  • reply
  • like

Everything is working?

  • reply
  • like

Or the fact that ../now.json did not point to a now.json file. Yeah everything seems to work now! Thanks for the support!

like-fill
1
  • reply
  • like

Glad it is working!

like-fill
1
  • reply
  • like

March 29, 2020 at 4:58pm
  • reply
  • like

Hi, We are facing some issue with gitlab CI/CD of a NX workspace monorepo (nestjs + Angular) and Zeit. Everytime I am getting an error same as described one - "You defined 1 build that did not match any source files (please ensure they are NOT defined in .nowignore)" Here is my now.json -

{
"version": 2,
"name": "zdeskweb",
"builds": [
{ "src": "/dist/apps/api/main.js", "use": "@now/node" },
{ "src": "/dist/apps/zdeskweb/**", "use": "@now/static" }
],
"routes": [
{ "src": "/api/(.*)", "dest": "/dist/apps/api/main.js" },
{ "handle": "filesystem" },
{ "src": "/assets/(.*)", "dest": "/dist/apps/zdeskweb/assets/$1" },
{ "src": "/(.*).(js|css|ico)", "dest": "/dist/apps/zdeskweb/$1.$2" },
{ "src": "/(.*)", "dest": "/dist/apps/zdeskweb/index.html" }
]
}

My zeit build configs are in attached image.

my build script in package.json is = ng build --prod zdeskweb && ng build --prod api

I am not able to figure it out that what shall we do in order to achieve a smooth integration for monorepo as it gets deploys very smoothly from dev machine using ng build --prod zdeskweb && ng build --prod api && now --prod; but it's not working with Gitlab.

Any suggestion will be helpful.

THanks.

Edited
  • reply
  • like

Hi, We are facing some issue with gitlab CI/CD of a NX workspace monorepo (nestjs + Angular) and Zeit. Everytime I am getting an error same as described one - "You defined 1 build that did not match any source files (please ensure they are NOT defined in .nowignore)" Here is my now.json -

{
"version": 2,
"name": "zdeskweb",
"builds": [
{ "src": "/dist/apps/api/main.js", "use": "@now/node" },
{ "src": "/dist/apps/zdeskweb/**", "use": "@now/static" }
],
"routes": [
{ "src": "/api/(.*)", "dest": "/dist/apps/api/main.js" },
{ "handle": "filesystem" },
{ "src": "/assets/(.*)", "dest": "/dist/apps/zdeskweb/assets/$1" },
{ "src": "/(.*).(js|css|ico)", "dest": "/dist/apps/zdeskweb/$1.$2" },
{ "src": "/(.*)", "dest": "/dist/apps/zdeskweb/index.html" }
]
}

My zeit build configs are in attached image.

my build script in package.json is = ng build --prod zdeskweb && ng build --prod api

I am not able to figure it out that what shall we do in order to achieve a smooth integration for monorepo as it gets deploys very smoothly from dev machine using ng build --prod zdeskweb && ng build --prod api && now --prod; but it's not working with Gitlab.

Any suggestion will be helpful.

THanks.

I have already tried with different Zeit configurations like others, Angular and next.

  • reply
  • like