-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module '@nodelib/fs.stat' #2
Comments
Here is detail of my errors.
Also Other people seem to be having the same problem as me. Here is my package.json. {
"name": "x",
"version": "0.0.0",
"engines": {
"node": "10.x"
},
"private": true,
"maintainers": [
"a@hax0r.info"
],
"description": "description",
"author": "영준",
"scripts": {
"document": "npx compodoc -p tsconfig.json -s",
"build": "tsc -p tsconfig.json",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "ts-node -r tsconfig-paths/register src/main.ts",
"start:dev": "nodemon",
"start:debug": "nodemon --config nodemon-debug.json",
"prestart:prod": "rimraf dist && npm run build",
"start:prod": "node -r dist/src/main.js",
"lint": "tslint -p tsconfig.json -c tslint.json",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config=e2e/jest-e2e.json --forceExit --detectOpenHandles"
},
"husky": {
"hooks": {
"pre-commit": "npm run format",
"pre-push": "npm run test & npm run test:e2e"
}
},
"dependencies": {
"@nestjs/common": "6.7.1",
"@nestjs/core": "6.7.1",
"@nestjs/platform-express": "6.7.1",
"@nestjs/jwt": "^6.1.1",
"@nestjs/platform-fastify": "^6.7.1",
"@nestjs/swagger": "^3.1.0",
"@types/node": "^10.12.18",
"aws-sdk": "^2.524.0",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.2.3",
"class-validator": "^0.10.0",
"compression": "^1.7.4",
"dotenv": "^8.1.0",
"email-templates": "^6.0.2",
"express": "^4.16.4",
"express-rate-limit": "^5.0.0",
"faker": "^4.1.0",
"fastify-swagger": "^2.4.0",
"helmet": "^3.21.0",
"i18n": "^0.8.3",
"jsonwebtoken": "^8.5.1",
"moment": "^2.24.0",
"mysql2": "^1.6.5",
"nest-raven": "^5.0.0",
"nodemailer": "^6.3.0",
"pug": "^2.0.4",
"qs": "^6.8.0",
"reflect-metadata": "^0.1.13",
"request-ip": "^2.1.3",
"rimraf": "^2.6.2",
"rxjs": "6.5.3",
"sequelize": "^5.18.4",
"sequelize-typescript": "^1.0.0",
"slack-notify": "^0.1.7",
"swagger-ui-express": "^4.0.2",
"tslint-clean-code": "^0.2.9"
},
"devDependencies": {
"@compodoc/compodoc": "^1.1.10",
"@nestjs/testing": "^6.0.0",
"@now/node": "^1.0.0",
"@types/aws-sdk": "^2.7.0",
"@types/bcryptjs": "^2.4.2",
"@types/compression": "^1.0.1",
"@types/dotenv": "^6.1.1",
"@types/email-templates": "^6.0.0",
"@types/express": "4.17.1",
"@types/express-rate-limit": "^3.3.2",
"@types/faker": "^4.1.5",
"@types/helmet": "0.0.44",
"@types/jest": "^23.3.13",
"@types/jsonwebtoken": "^8.3.3",
"@types/moment": "^2.13.0",
"@types/nodemailer": "^6.2.1",
"@types/qs": "^6.5.3",
"@types/request-ip": "0.0.34",
"@types/sequelize": "^4.28.4",
"@types/supertest": "^2.0.8",
"husky": "^3.0.5",
"jest": "^23.6.0",
"nodemon": "^1.18.9",
"prettier": "^1.15.3",
"supertest": "^3.4.2",
"ts-jest": "24.1.0",
"ts-node": "8.4.1",
"tsconfig-paths": "^3.9.0",
"tslint": "5.20.0",
"typescript": "^3.6.3"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".spec.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
And here is my
|
Very strange! It looks like from researching around the issue might be with https://github.com/mrmlnc/fast-glob, but I can't find any issues/evidence there of it either. It sounds like fs.stat or global aren't packaging their dependencies correctly somehow hmm |
I haven't used that library before, but I tried adding just the basic setup (and installation of it) to this repo itself and was able to run locally and import * as fsStat from '@nodelib/fs.stat';
@Injectable()
export class AppService {
constructor() {
fsStat.stat('path', (error, stats) => { /* … */ });
}
// ... https://nestjs-now.mpieszak84.now.sh/ But it does sound like a downstream dependency issue regardless, as now is just taking everything we "build" and deploying the dist of it all. I wish it throw some better error information! |
I'm using current repository.
When i'm trying to deploy the console is throwing this error "Cannot find module '@nodelib/fs.stat"
I'm not actually using this module on my app.
Is this NestJS issues ? Or zeit issues? @MarkPieszak
The text was updated successfully, but these errors were encountered: