You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously on 1.3x the entry point file was allowed to be used in the root directory & it wasn't necessary that it should be inside lib directory.
However, on 1.4x function building fails.
Even the default path for the entry point is lib/main.dart if Platform.environment['OPEN_RUNTIMES_ENTRYPOINT'] is null.
If the entry point is in the root directory, the build fails with below error:
server.dart:5:8: Error: Error when reading 'lib/main.dart': No such file or directory
import 'package:packageName/main.dart' as user_code;
^
server.dart:107:25: Error: Method not found: 'main'.
user_code.main(context)
^^^^
server.dart:117:38: Error: Method not found: 'main'.
output = await user_code.main(context);
Build works fine if the main.dart is inside the lib folder.
Previously on
1.3x
the entry point file was allowed to be used in the root directory & it wasn't necessary that it should be insidelib
directory.However, on
1.4x
function building fails.Even the default path for the entry point is
lib/main.dart
ifPlatform.environment['OPEN_RUNTIMES_ENTRYPOINT']
isnull
.If the entry point is in the root directory, the build fails with below error:
Build works fine if the
main.dart
is inside thelib
folder.The error stems from here, I believe:
Proposed solution:
Dart
file structure conventionlib
directory when building the function.The text was updated successfully, but these errors were encountered: