axnsan12 / drf-yasg

Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
https://drf-yasg.readthedocs.io/en/stable/
Other
3.42k stars 439 forks source link

Including package-lock.json breaks project deps #427

Open radzhome opened 5 years ago

radzhome commented 5 years ago

I'm assuming that package-lock.json should not be included. When I add drf_yasg to INSTALLED_APPS in settings.py (this project has its own package.json and package-lock.json. Now when I run gulp build it fails with the following:

(node:1) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.

Unhandled rejection Error in plugin "webpack-stream"

Followed by a bunch of these errors:

[tsl] ERROR in /usr/src/app/static/websites/ts/components/list/templates/trending.spec.ts(86,3)
      TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'IteratorResult<[string, string]>' has no compatible call signatures.

Here is my package deps:

"dependencies": {
    "@babel/polyfill": "^7.4.4",
    "intersection-observer": "^0.7.0",
    "vue": "^2.6.9",
    "whatwg-fetch": "^3.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.4.5",
    "@babel/plugin-proposal-class-properties": "^7.5.0",
    "@babel/plugin-transform-runtime": "^7.4.4",
    "@babel/preset-env": "^7.4.5",
    "@babel/preset-typescript": "^7.3.3",
    "@types/jest": "^24.0.15",
    "@types/node": "^12.0.2",
    "babel-loader": "^8.0.6",
    "babel-runtime": "^6.26.0",
    "browser-sync": "^2.26.5",
    "browserify": "^16.2.3",
    "glob": "^7.1.4",
    "gulp": "^4.0.0",
    "gulp-autoprefixer": "^6.1.0",
    "gulp-babel": "^8.0.0",
    "gulp-concat-multi": "^1.0.1",
    "gulp-eslint": "^5.0.0",
    "gulp-imagemin": "^5.0.3",
    "gulp-minify-css": "^1.2.4",
    "gulp-rename": "^1.4.0",
    "gulp-sass": "^4.0.2",
    "gulp-sass-lint": "^1.4.0",
    "gulp-terser": "^1.1.7",
    "gulp-tslint": "^8.1.4",
    "gulp-watch": "5.0.1",
    "jest": "^24.8.0",
    "merge-stream": "^1.0.1",
    "onchange": "^5.2.0",
    "regenerator": "^0.14.1",
    "ts-loader": "^6.0.2",
    "tsify": "^4.0.1",
    "tslint": "^5.16.0",
    "tslint-sonarts": "^1.9.0",
    "typescript": "^3.4.5",
    "webpack-stream": "^5.2.1"
  },

This only seems to be happening when I install the package in a docker container (so not using virtualenv) and the os is alpine linux. Can only reproduce in the container, it seems to e fine locally on osx.

axnsan12 commented 5 years ago

I don't see how having a package-lock.json inside drf-yasg affects gulp/npm in your top-level project? Could you provide more details?

radzhome commented 4 years ago

I think its just interfering deps, here is my docker image https://hub.docker.com/layers/pmdigital/3.7-alpine-dcs-base/1.2.2/images/sha256-404608c6c79bd559c5293eeb826c4aaed0f7732b64d927bfa9ca89b60be03aa2?context=explore