-
Notifications
You must be signed in to change notification settings - Fork 71
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
Navi script build failed #92
Comments
No idea why this would be happening now. I think you're the second person to come across this, so there's probably something going on. However, it's still working fine for me, so it's difficult to test. Does it still build properly on the previous machine? |
I had the same problem with Node v12.10, downgrading to v11.15 fixed it for me. |
Ran into this issue on node |
Confirmed that v12 and v13 will cause this error. Downgrade to v11.15 works. |
I'm new to Navi and after implementing static rendering just ran into this issue - I downgraded to Node 10 with NVM as a test and I'm still getting the "Couldn't find window.NaviScripts" error, except in this case it's only referencing: crawl (../node_modules/navi-scripts/lib/crawl.js:22:15) In Node 12+ I get the same error as @moderngeekcloud. Looking at crawl.js, the relevant code seems to be:
I ran some console.logs in crawl.js and this is what I got: console.log(config)
console.log(app):
So what I can tell at the moment is that createScriptRunner takes a config object, returns a promise and evaluates to an app object that has isBuild and routes properties, but the routes property is not being passed to the app object. Further up the chain, during the build process the following line is logged:
I'm wondering if I've missed something in the docs about passing a config option somewhere? I've followed the examples from here: https://frontarm.com/navi/en/guides/static-rendering/#navi-scriptsregister Additional notes: I installed Node 11.14.0 and still get the error only in crawl.js. Same with 11.15.0. Moving back up to Node 12.7 I get the error in crawl.js, build.js and navi-scripts.js. Deleting node_modules and reinstalling 11.15.0 from scratch also just leads to the same error in crawl.js:22:15 Kind of at a loss, will update if I find anything out. |
Running with node
|
Is there a solution to this? I am experiencing the same error with create-react-blog. |
Same errors here with navi-scripts builds. I can get the base blog to build, but when I try to link to a post or refresh the page on a post, I get that the page isn't found because navi-build fails and I'm guessing then is unable to create the static html files. I am running
|
Hello,
When trying to build my blog, I'm getting
[ohshit] An error occured while building your app Couldn't find window.NaviScripts - did you call register()? Error: Couldn't find window.NaviScripts - did you call register()? at crawl (D:\blogReact\node_modules\navi-scripts\lib\crawl.js:22:15) at build (D:\blogReact\node_modules\navi-scripts\lib\build.js:9:32) at Command.<anonymous> (D:\blogReact\node_modules\navi-scripts\bin\ navi-scripts.js:89:7)
I have register in my index.js file. I have build the website before on another machine and it was working.
navi version: 0.12.6
navi-scripts version: 0.12.4
Any ideas what can be causing this?
The text was updated successfully, but these errors were encountered: