Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Not implemented newline kind: undefined #10

Closed
joeneldeasis opened this issue May 17, 2022 · 5 comments
Closed

Not implemented newline kind: undefined #10

joeneldeasis opened this issue May 17, 2022 · 5 comments

Comments

@joeneldeasis
Copy link

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
Copy link
Owner

maxgalbu commented May 17, 2022

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

Could you please open these two files with vscode:

  • config/auth.ts
  • contracts/auth.ts

and on EACH file do:

  • Ctrl+Shift+P
  • search command Change End of Line Sequence and run it
  • choose one option (eg on mac I have LF and CRLF, maybe if you're on windows you'll have CR too)

then run configure again

@joeneldeasis
Copy link
Author

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
Copy link
Author

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

@maxgalbu
Copy link
Owner

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

@maxgalbu
Copy link
Owner

published 1.1.5 with the fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants