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

Import not working with mongoose on fastify #26

Open
dhbahr opened this issue Jul 21, 2023 · 4 comments
Open

Import not working with mongoose on fastify #26

dhbahr opened this issue Jul 21, 2023 · 4 comments

Comments

@dhbahr
Copy link

dhbahr commented Jul 21, 2023

As per the title, export works just fine as far as I can tell, import however reports that it has been successful, but nothing really happens.

package.json:

  "type": "module",
  "name": "tmp",
  "description": "This project was bootstrapped with Fastify-CLI.",
  "version": "1.0.0",
  "main": "app.js",
  "directories": {
    "test": "test"
  },
  "scripts": {
    "test": "tap \"test/**/*.test.js\"",
    "start": "fastify start -l info app.js",
    "dev": "fastify start -w -l info -P app.js",
    "lint": "standard",
    "lint:fix": "standard --fix"
  },
  "eslintConfig": {
    "extends": "fastify"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@adminjs/fastify": "^4.0.1",
    "@adminjs/import-export": "^3.0.0",
    "@adminjs/mongoose": "^4.0.0",
    "@aws-sdk/client-s3": "^3.373.0",
    "@fastify/auth": "^4.3.0",
    "@fastify/autoload": "^5.0.0",
    "@fastify/bearer-auth": "^9.0.0",
    "@fastify/cors": "^8.3.0",
    "@fastify/mongodb": "^7.0.0",
    "@fastify/sensible": "^5.0.0",
    "adminjs": "^7.0.9",
    "bcryptjs": "^2.4.3",
    "crypto-random-string": "^5.0.0",
    "fastify": "^4.18.0",
    "fastify-cli": "^5.7.1",
    "fastify-plugin": "^4.5.0",
    "mongoose": "^7.3.1"
  },
  "devDependencies": {
    "@istanbuljs/esm-loader-hook": "0.2.0",
    "husky": "^8.0.3",
    "standard": "^17.1.0",
    "tap": "^16.1.0"
  },
  "tap": {
    "node-arg": [
      "--no-warnings",
      "--experimental-loader",
      "@istanbuljs/esm-loader-hook"
    ]
  },
  "husky": {
    "hooks": {
      "pre-commit": "npm run lint:fix"
    }
  }
}
@deepaktsw
Copy link

+1

Looking into the networks tab, it appears that the import call returns an error saying that no file was uploaded.

image

{
    "record": {
        "params": {},
        "populated": {},
        "baseError": null,
        "errors": {
            "file": {
                "message": "No file uploaded"
            }
        }
    },
    "records": [],
    "notice": {
        "message": "thereWereValidationErrors",
        "type": "error"
    }
}

However in the payload I can see that the file was sent in it -
image

Any help here is appreciated!

@martinhahn
Copy link

Any news on this? @JonaszJestem @dziraf @AdamFrydrychRST

@dhbahr
Copy link
Author

dhbahr commented Aug 22, 2023

The silence really is quite disappointing...

@martinhahn
Copy link

Any news on this? @JonaszJestem @dziraf @AdamFrydrychRST

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

3 participants