-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
config folder at root instead of custom folder #987
Comments
It is important that this happens before the |
@daffl
|
Have a look at the node-config Wiki but I don't think |
@daffl |
I don't understand what the problem is then. If you set const path = require('path');
process.env['NODE_CONFIG_DIR'] = path.join(__dirname, 'config/');
const configuration = require('@feathersjs/configuration')l The expected folder will be If you want it at process.env['NODE_CONFIG_DIR'] = path.join(__dirname, '..', 'server', 'config/'); |
Hi @daffl I forgot to mention that my app.js is at the server folder. Does this change anything? |
It shouldn't. I also just cloned your repository and everything seems to be working fine so I really don't understand what the problem is. The error |
Hi @daffl This is what happens when I create the first service:
|
The problem is that generator does not run the application so there is no way for it to know about the change that has been made to One solution would be for the generator to add a directories: {
lib,
test: 'test/'
}, The generator can then use that directory (or the default) in https://github.com/feathersjs/feathers/blob/master/packages/generator-feathers/generators/connection/index.js#L141-L144 when writing the configuration: this.fs.writeJSON(
this.destinationPath(this.pkg.directories.config, 'default.json'),
config
); This would allow to customize the location of the generated configuration files. |
This has been released in the latest |
Steps to reproduce
Hi.
I have this repo trying to make nuxt to work with feathers3.2 and its CLI.
https://github.com/woodgates/feathers-nuxt
The configuration is at "server/config" folder. As set in the documents I have my app.js with
When I create the first service with "feathers generate services" all works good except for the database configuration which is stored in the root/config folder instead of root/server/config.
So when I run npm run dev I got
TypeError: Path must be a string. Received undefined
Expected behavior
The database configuration should be stored on the root/server/config/default.json file.
Actual behavior
The database configuration is stored on the root/config/default.json file.
System configuration
Module versions (especially the part that's not working):
part of package.json:
"directories": {
"lib": "server",
"test": "test/"
},
"dependencies": {
"@feathersjs/configuration": "^2.0.2",
"@feathersjs/express": "^1.2.5",
"@feathersjs/feathers": "^3.2.1",
"feathers-nedb": "^3.1.0",,
"nuxt": "^1.4.2",
NodeJS version:
8.11.4
Operating System:
I working with Linux Mint 19.
Browser Version:
Chromium
React Native Version:
Module Loader:
npm
The text was updated successfully, but these errors were encountered: