Blitz: [Windows] Error no parsers registered for: "]"

Created on 26 Apr 2020  Â·  7Comments  Â·  Source: blitz-js/blitz

What is the problem?

Fail to navigate to /projects after running blitz generate all project:

Failed to compile

./pages/projects/index.tsx
Module not found: Can't resolve 'app/projects/queries/getProjects' in 'C:\dev\blitzapp2\.blitz\caches\dev\pages\projects'

This error occurred during the build time and cannot be dismissed.

Seems like the paths options in generated tsconfig.json simply does not have the path for app?

UPDATE: Files generated under app/projects/queries look like get_%= ModelName %_.ts, with templates in them, instead of something like getProjects.ts. Look like a problem with template replacement?

Steps to Reproduce:

  1. Start a fresh project with new.
  2. blitz start, do as it says
  3. After running blitz generate all project navigate to /projects.

Versions:

Windows 10 | win32-x64 | Node: v12.15.0

blitz: 0.6.4 (global)
blitz: 0.6.4 (local)

Supporting Documentation

kinbad-experience kinbug needs investigation owindows scopcli statudone

All 7 comments

I can give it a try if something needs to be fixed.

This issue should have been fixed in 0.6.5. Can you upgrade to the latest and test?

I upgraded to 0.6.5 and confirm that generate all project generates files correctly. However when I try to start I get the following error:

$ C:\dev\blitzapp3\node_modules\.bin\blitz start
You are using alpha software - if you have any problems, please open an issue here:
  https://github.com/blitz-js/blitz/issues/new/choose

â—¢ \package.jsonC:\dev\blitzapp3\node_modules\snapdragon\lib\parser.js:473
        throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"');
        ^

Error: no parsers registered for: "]"
    at parse (C:\dev\blitzapp3\node_modules\snapdragon\lib\parser.js:473:15)
    at Parser.parse (C:\dev\blitzapp3\node_modules\snapdragon\lib\parser.js:477:24)
    at Snapdragon.parse (C:\dev\blitzapp3\node_modules\snapdragon\index.js:122:28)
    at Snapdragon.<anonymous> (C:\dev\blitzapp3\node_modules\braces\lib\braces.js:40:45)
    at Braces.parse (C:\dev\blitzapp3\node_modules\braces\lib\braces.js:66:26)
    at Braces.expand (C:\dev\blitzapp3\node_modules\braces\lib\braces.js:87:18)
    at create (C:\dev\blitzapp3\node_modules\braces\index.js:142:15)
    at memoize (C:\dev\blitzapp3\node_modules\braces\index.js:298:13)
    at Function.braces.create (C:\dev\blitzapp3\node_modules\braces\index.js:165:10)
    at Function.braces.expand (C:\dev\blitzapp3\node_modules\braces\index.js:81:17)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I wanted to trace how snapdragon even gets into the project, and looking through the yarn.lock file, it seems like via:

globby -> fast-glob -> micromatch -> snapdragon

I'm guessing that globby is struggling with the [] in parameterized filenames, specifically our usage in load-blitz. We probably need some better handling there to escape those brackets. Next should have some code that does exactly the same since we're copying their syntax so we should see how they handle it

Hey @jlkiri, can you check if you are still experiencing this issue with [email protected]?

I ran into the same problem a while back but have not been able to reproduce it with recent versions of Blitz.

Not experiencing anymore

@jlkiri sounds good! let me know if it comes up again and we can take a look

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryardley picture ryardley  Â·  5Comments

yhoiseth picture yhoiseth  Â·  3Comments

aaronfulkerson picture aaronfulkerson  Â·  3Comments

timsuchanek picture timsuchanek  Â·  5Comments

svobik7 picture svobik7  Â·  3Comments