-
Notifications
You must be signed in to change notification settings - Fork 83
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
[Error] When use 'api init' Error: Module did not self-register #61
Comments
@c0ncentus : I did use that link to set it up : The main change is I see you have
in your code example. Hope it helps. |
Hi @c0ncentus - The It looks like you are running on Windows, which we have not tested rigorously. I am planning to get a Windows setup for testing soon, but in the meantime, if you continue to run into issues could you record a screencast so we can see all the steps and complete error messages? |
I will see later if I have another trouble ^^ |
import * as express from 'express';
// tslint:disable-next-line: no-duplicate-imports
const app = express();
app.get('/', (req: any, res: any) => { res.json({ test: 'Api is alive !' }); });
app.get('/Test', (req: any, res: any) => { res.json({ exTest: 'Expected this !' }); });
app.listen(process.env.OPTIC_API_PORT || 3000, () => { console.log('My API is running...'); });
export default app; still the same issue there it is : https://github.com/c0ncentus/test_Optic (the repo) |
@c0ncentus thanks for the additional info! When you run Based on the original error message you shared:
it seems like the failure is that one of our dependencies is not working. The most likely cause is upgrading your node version without rebuilding Optic. Can you npm uninstall and reinstall |
thats weird but it work :) However i change many times the node version before the install of optic cli : o thanks for help 👍 |
* Implement getting github context * Type out the event in context * Change loading from env variable to file load * Add comment to check run behavior * fmt
Hi,
I follow step by step the doc https://docs.useoptic.com/ but its produce error when type "api init"
Env
npm 6.13.7
@useoptic/cli/7.0.5 win32-x64 node-v13.6.0
project dependency :
"dependencies": {
"@types/express": "^4.17.2",
"@types/node": "^13.7.1",
"express": "^4.17.1"
}
When use api init its produce this:
There are other requirements for launching api init ?
The text was updated successfully, but these errors were encountered: