Vulcan
Vulcan copied to clipboard
Error "operation not permitted" when I first start Vulcan
Just gave VulcanJS a try after using Meteor for a while. I'm getting the following error:
` Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead. meteor://💻app/packages/vulcan_lib.js:422 if (error) throw error; // eslint-disable-next-line no-console ^
[Error: EPERM: operation not permitted, open 'C:\schema.graphql'] { errno: -4048, code: 'EPERM', syscall: 'open', path: 'C:\schema.graphql' } Started your app.
App running at: http://localhost:3000/ Type Control-C twice to stop.
Exited with code: 1 Your application is crashing. Waiting for file change. `
Note that I did run meteor reset and installed bcrypt, which was the error thrown before this one, but now I can't get anything going. I guess I need to change the location of the "schema.graphql" but I can't find where to edit this line, the settings.json does not contain this information. Would this be the right solution? Is there a different location where this file would be?
In which folder are you running Vulcan? The logic that create schema.graphql
may not choose the right path on windows. It should be the root of your code.
You indeed need to change the location, but there is no setting to do so, it probably needs a PR to fix this.
The relevant function is getGraphQLSchema
called on app startup.
Logic is happening here:
packages/vulcan-lib/lib/server/debug.js
In the logToFile
function, the path where schema.graphql
is not constructed in a cross platform way, we should use path.join
instead.
I would happily accept a PR that fixes this, as I don't have a development environment on Windows easiliy available.
Would be nice to have this directory specified in the settings.json as a "graphqlpath" value and called with Meteor.settings.graphqlpath instead.
I tried looking for the " packages/vulcan-lib/lib/server/debug.js" path and couldn't find it.
This file is in the core Vulcan repo, you need a 2-repo install to tweak Vulcan itself: https://docs.vulcanjs.org/#Two-Repo-Install-Optional
I don't think we will make this an option, because in some distant future we might need a reliable prebuild step. It should probably live in the ".vulcan" folder though