maxgalbu / adonis5-jwt

JWT Authentication service for Adonisjs v5
MIT License
86 stars 15 forks source link

Not implemented newline kind: undefined #10

Closed joeneldeasis closed 2 years ago

joeneldeasis commented 2 years ago

I'm getting this error after running the node ace configure adonis5-jwt

Steps done:

  1. install the adonis5-jwt with npm install adonis5-jwt
  2. run the node ace configure adonis5-jwt

Here's the error logs after running the node ace configure adonis5-jwt

Run `npm audit` for details.
➜  testapp-api git:(testing) ✗ node ace configure adonis5-jwt
❯ Select provider for finding users · user
❯ Do you want to persist JWT in database/redis (please read README.md beforehand)? (y/N) · true
❯ Select the provider for storing JWT tokens · redis
❯ Enter the default expire time for the JWT (10h = 10 hours, 5d = 5 days, etc) · 1d
❯ Enter the default expire time for the refresh token (10h = 10 hours, 5d = 5 days, etc) · 1d
UPDATE: .env,.env.example

  Error 

 Not implemented newline kind: undefined

   1  newLineKindToString
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:379

   2  ManipulationSettingsContainer.getNewLineKindAsString
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:259

   3  ProjectContext.createWriter
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:19554

   4  SourceFile._getWriter
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:3962

   5  SourceFile._getWriterWithChildIndentation
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:3944

   6  getNewText
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:2492

   7  insertIntoBracesOrSourceFile
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:2484

   8  insertIntoBracesOrSourceFileWithGetChildren
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:2516

   9  SourceFile._insertChildren
     /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:11299

   10  SourceFile.insertImportDeclarations
      /Users/joeneldeasis/Projects/testapp-api/node_modules/ts-morph/dist/ts-morph.js:9002

➜  testapp-api git:(testing) ✗ 
maxgalbu commented 2 years ago

There's a file with an unknown newline kind 🤔 what is your OS?

Could you please open these two files with vscode:

and on EACH file do:

then run configure again

joeneldeasis commented 2 years ago

Hi @maxgalbu here's the details of my machine

OS: macOS Monterey 12.3.1 Node: v16.14.2

I tried the steps that you gave in my existing project, but I still encounter the same issue while it works on new adonis project. Closing this issue now. Thanks

joeneldeasis commented 2 years ago

@maxgalbu Found out the issue, to anyone who will encounter this, removing .editorconfig in the project folder will cause this error.

maxgalbu commented 2 years ago

Oh that's an easy fix. Thanks for spotting this

maxgalbu commented 2 years ago

published 1.1.5 with the fix