Open guildenstern70 opened 2 years ago
See as an example
please use the newest version, thanks
It appears that the problem is still there:
`
0 | EvalError: Code generation from strings disallowed for this context at new Function ( |
---|---|
1 | isolate start time: 2 milliseconds |
2 | EvalError: Code generation from strings disallowed for this context at new Function ( |
3 | isolate start time: 2 milliseconds |
4 | EvalError: Code generation from strings disallowed for this context at new Function ( |
5 | isolate start time: 2 milliseconds |
6 | EvalError: Code generation from strings disallowed for this context at new Function ( |
7 | isolate start time: 2 milliseconds |
`
Hey can you give me some code to reproduce it?
Sure, here it is: https://github.com/guildenstern70/SmartDeno
The code compiles and runs perfectly in local. The problem arises only when deploying on Deno Deploy.
The newest patch version view_engine@v10.5.1b
should fix the problem. @guildenstern70
Ok, problem fixed... but now there is another problem:
View-Engine: Deno.readTextFileSync is not a function
Program starts, but web page is not displayed - again, only on Deno Deploy. Locally it works.
Logs here:
0 | 2022-04-21 6:54:22.928\|INFO \|> GET https://smart-deno-project.deno.dev/ - 1ms
-- | --
1 | View-Engine: Deno.readTextFileSync is not a function
2 | views/index.njk
3 | 2022-04-21 6:52:8.841\|INFO \|> GET https://smart-deno-project.deno.dev/ - 0ms
4 | View-Engine: Deno.readTextFileSync is not a function
5 | views/index.njk
6 | 2022-04-21 6:51:29.749\|INFO \|> GET https://smart-deno-project-t8m805gnc1g0.deno.dev/ - 0ms
7 | View-Engine: Deno.readTextFileSync is not a function
8 | views/index.njk
9 | 2022-04-21 6:51:28.206\|INFO \|> GET https://smart-deno-project-t8m805gnc1g0.deno.dev/ - 1ms
10 | View-Engine: Deno.readTextFileSync is not a function
11 | views/index.njk
12 | 2022-04-21 6:51:2.549\|INFO \|> GET https://smart-deno-project.deno.dev/ - 1ms
13 | View-Engine: Deno.readTextFileSync is not a function
14 | views/index.njk
15 | 2022-04-21 6:50:21.499\|INFO \|> GET https://smart-deno-project.deno.dev/ - 2ms
16 | View-Engine: Deno.readTextFileSync is not a function
17 | views/index.njk
18 | 2022-04-21 6:50:21.491\|WARN \|> 🦕 Deno server running at http://localhost:8000/ 🦕
19 | 2022-04-21 6:50:21.491\|INFO \|> Running in: /src
20 | 2022-04-21 6:50:21.490\|INFO \|> Setting up web routes...
21 | 2022-04-21 6:50:21.487\|INFO \|> Setting up routes...
22 | isolate start time: 0.003115203 seconds
I'm receiving the same issue. Any update?
From the Deno Deploy Discord
That module uses a sync API which is not supported on Deploy The best course of action for now would be to ask the maintainer to add support for async version as well
@gjuoun Is that a heavy lift to add that support? Thx!
@hirefrank @guildenstern70
When deployed on Deno Deploy it gives the following error: