Closed LLLLLamHo closed 4 years ago
You have different versions of the @nestjs/cli
installed globally. Ensure to update them to the latest versions.
The same problem occurred when I upgraded the cli to 6.12.9
Please, provide a minimal repository which reproduces your issue.
I have the same problem, but it's building just fine on my computer but not in my GitHub actions workflow which is a linux machine.
Only some classes from my domain aren't found.
Here is my package.json
"dependencies": { "@nestjs/common": "^6.7.2", "@nestjs/core": "^6.7.2", "@nestjs/mongoose": "^6.1.2", "@nestjs/platform-express": "^6.7.2", "mongoose": "^5.8.7", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.0", "rxjs": "^6.5.3" }, "devDependencies": { "@nestjs/cli": "^6.9.0", "@nestjs/schematics": "^6.7.0", "@nestjs/testing": "^6.7.1", "@types/express": "^4.17.2", "@types/jest": "^24.0.18", "@types/node": "^12.7.5", "@types/supertest": "^2.0.8", "jest": "^24.9.0", "prettier": "^1.18.2", "supertest": "^4.0.2", "ts-jest": "^24.1.0", "ts-loader": "^6.1.1", "ts-node": "^8.4.1", "tsconfig-paths": "^3.9.0", "tslint": "^5.20.1", "typescript": "^3.7.4" },
and here is my workflow
` name: Node CI
on: [push, pull_request]
jobs: build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm run lint
npm test
env:
CI: true
`
also tried with npm install
instead of npm ci
and npm run build
instead of npm run build --if-present
Facing the same issue
I have the same problem, but it's building just fine on my computer but not in my GitHub actions workflow which is a linux machine.
I have same problem, and finally I found out that NodeJS version 8.x is not working (at the moment: Oct 2020)
Node 10 and 12 work fine
I having the same issue here but in pipelines and ubuntu 20.04
Thanks for reporting, but none of you have done what Kamil has asked and provided a minimum reproduction/ The stack traces and build errors don't help much if we can't see the code producing the errors.
It's hard to provide a code sample, I'll try, the GitHub actions and my server both use ubuntu 20.04, so it's pretty sure the problem occurs with Linux env, moreover; I have noticed in build sometime the directories aren't mapping with the write casing, macOS is somehow handling this behaviour but Linux isn't. While I was surfing StackOverflow I can across this
as for what I did for the time being
If it helps to know, Linux file directories are case sensitive, while MacOS directories are not. So whle on MacOS src/Mailer/mailer.service
may be valid, it may need to be src/mailer/mailer.service
on Linux. Most of the time when dealing with file directories for code, i personally prefer to keep everything lowercase, just makes it easier to look at and read from, in my opinion.
I don't know to be happy or sad right now, but I did the following
Bug Report
Current behavior
I am running nest build command in centos of Linux system, but I Cannot find module But I run it on my MAC and it compiles。
"@nestjs/common": "6.7.2", "@nestjs/core": "6.7.2", "@nestjs/cli": "6.9.0",
Expected behavior
Can compile normally under Linux
Environment