Skip to content
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 import module #50

Open
anzejarni opened this issue May 26, 2023 · 0 comments
Open

Cannot import module #50

anzejarni opened this issue May 26, 2023 · 0 comments

Comments

@anzejarni
Copy link

anzejarni commented May 26, 2023

I am having issues using the module with Vue+Quasar+Vite.
If I try importing the module with:
import { DCRFPlugin } from 'plugins/djangochannelsrestframework'

I get the following error:

has-flag.js:30 Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
    at module.exports (has-flag.js:30:28)
    at node_modules/@colors/colors/lib/system/supports-colors.js (supports-colors.js:34:5)
    at __require (chunk-OL3AADLO.js?v=55207a85:9:50)
    at node_modules/@colors/colors/lib/colors.js (colors.js:41:24)
    at __require (chunk-OL3AADLO.js?v=55207a85:9:50)
    at node_modules/@colors/colors/safe.js (safe.js:9:14)
    at __require (chunk-OL3AADLO.js?v=55207a85:9:50)
    at node_modules/logform/dist/colorize.js (colorize.js:9:14)
    at __require (chunk-OL3AADLO.js?v=55207a85:9:50)
    at node_modules/logform/dist/levels.js (levels.js:3:16)
module.exports	@	has-flag.js:30
node_modules/@colors/colors/lib/system/supports-colors.js	@	supports-colors.js:34
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/@colors/colors/lib/colors.js	@	colors.js:41
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/@colors/colors/safe.js	@	safe.js:9
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/logform/dist/colorize.js	@	colorize.js:9
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/logform/dist/levels.js	@	levels.js:3
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/logform/dist/browser.js	@	browser.js:17
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/winston/dist/winston.js	@	winston.js:9
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/dcrf-client/lib/logging.js	@	logging.js:4
__require	@	chunk-OL3AADLO.js?v=55207a85:9
node_modules/dcrf-client/lib/index.js	@	index.js:35
__require	@	chunk-OL3AADLO.js?v=55207a85:9
(anonymous)	@	dep:dcrf-client:1

The project uses there dependencies:

{
  "scripts": {
    "lint": "eslint --ext .js,.ts,.vue ./",
    "format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
    "test": "echo \"No test specified\" && exit 0",
    "dev": "quasar dev",
    "build": "quasar build"
  },
  "dependencies": {
    "@quasar/extras": "^1.0.0",
    "axios": "^1.2.1",
    "dcrf-client": "^1.1.0",
    "logform": "^2.5.1",
    "pinia": "^2.0.11",
    "quasar": "^2.6.0",
    "vue": "^3.0.0",
    "vue-i18n": "^9.2.2",
    "vue-router": "^4.0.0"
  },
  "devDependencies": {
    "@intlify/vite-plugin-vue-i18n": "^3.3.1",
    "@quasar/app-vite": "^1.0.0",
    "@types/node": "^12.20.21",
    "@typescript-eslint/eslint-plugin": "^5.10.0",
    "@typescript-eslint/parser": "^5.10.0",
    "autoprefixer": "^10.4.2",
    "eslint": "^8.10.0",
    "eslint-config-prettier": "^8.1.0",
    "eslint-plugin-vue": "^9.0.0",
    "prettier": "^2.5.1",
    "typescript": "^4.5.4"
  },
  "engines": {
    "node": "^18 || ^16 || ^14.19",
    "npm": ">= 6.13.4",
    "yarn": ">= 1.21.1"
  }
}

Any idea what this could be and how to solve it? It seems to be related to the logging functionality and winston. I am using yarn for package management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant