gaetschwartz / build-runner Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://marketplace.visualstudio.com/items?itemName=GaetSchwartz.build-runner
License: MIT License
Home Page: https://marketplace.visualstudio.com/items?itemName=GaetSchwartz.build-runner
License: MIT License
When using flutter version manager (fvm.app) the build_runner extension doesn't work since flutter executable is not in the path and command 'fvm flutter' should be used instead of 'flutter.
Please consider allowing 'fvm flutter' in the list of available commands or allowing to edit the command in settings.json with arbitrary values
When using watch from status bar it keeps initializing. It never completes while flutter pub run build_runner watch --delete-conflicting-outputs
works fine.
Also generating freezed class give error:
Command 'Freezed: Generate a new Freezed class' resulted in an error (Running the contributed command: 'freezed.generate' failed.)
I think problem is with my IDE maybe.
Code - OSS
Version: 1.54.2
Commit: fd6f3bce6709b121a895d042d343d71f317d74e7
Date: 2021-03-12T19:27:39.374Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.11.7-arch1-1
Initially filed by @2shrestha22.
@yerzhant and @craigomac also commented.
i like to make packages for my data repositories which is in subfolders of my main project
example:
my_project/
my_project/packages/my_auth_repo/
my_project/packages/my_data_repo/
I also need to execute build runner inside of them, however this extension only works in the main project.
ps. dart's official extension recognizes the subproject in which the current open file is located and will execute commands in that subproject, such as pub get
.
I don't have Dart on my PATH, but the Dart extension has the dart.sdkPath
option to specify where the SDK is. It'd be great if this extension also respected this option instead of looking for Dart on the PATH.
Trying on a new computer, js-yaml fails to be found. Is there something special you have to do for extensions to add dependencies?
[2021-10-22 14:12:51.874] [exthost] [error] Activating extension gaetschwartz.build-runner failed due to an error:
[2021-10-22 14:12:51.874] [exthost] [error] Error: Cannot find module 'js-yaml'
Require stack:
- /home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js
- /snap/code/78/usr/share/code/resources/app/out/vs/loader.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-amd.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
at Module._load (internal/modules/cjs/loader.js:779:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js:17:14)
at Module.s._compile (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Function.r [as __$__nodeRequire] (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:5:101)
at w._loadCommonJSModule (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:26492)
at w._doActivateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:12722)
at w._activateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:11695)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 8)
at async Promise.all (index 0)[2021-10-22 14:12:51.874] [exthost] [error] Activating extension gaetschwartz.build-runner failed due to an error:
[2021-10-22 14:12:51.874] [exthost] [error] Error: Cannot find module 'js-yaml'
Require stack:
- /home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js
- /snap/code/78/usr/share/code/resources/app/out/vs/loader.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-amd.js
- /snap/code/78/usr/share/code/resources/app/out/bootstrap-fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
at Module._load (internal/modules/cjs/loader.js:779:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at v (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:698)
at Object.<anonymous> (/home/tim/.vscode/extensions/gaetschwartz.build-runner-0.5.1/out/extension.js:17:14)
at Module.s._compile (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1155:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Module._load (internal/modules/cjs/loader.js:823:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.i._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:28495)
at Function.b._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:25083)
at Function.d._load (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:103:60224)
at Module.require (internal/modules/cjs/loader.js:1006:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Function.r [as __$__nodeRequire] (/snap/code/78/usr/share/code/resources/app/out/vs/loader.js:5:101)
at w._loadCommonJSModule (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:113:26492)
at w._doActivateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:12722)
at w._activateExtension (/snap/code/78/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:99:11695)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 8)
at async Promise.all (index 0)
when i type CTRL + ALT + B
i'm getting this error
extension version : 0.8.0
Running `flutter.bat pub run build_runner build --build-filter C:/Users/myuser/Documents/mydocs/FLUTTER/myprojectname/lib/app/data/model/request/my_model/my_model_model.freezed.dart --build-filter C:/Users/myuser/Documents/mydocs/FLUTTER/myprojectname/lib/app/data/model/request/my_model/my_model_model.g.dart`
Current working folder: `c:\Users\myuser\Documents\mydocs\FLUTTER\myprojectname`
[INFO] Generating build script...
[INFO] Generating build script completed, took 369ms
Invalid argument (--build-filter): Not a valid build filter, must be either a relative path or `package:` uri.
FormatException: Unsupported scheme c: Instance of '_Uri'
Hi,
The error on the screenshot started happening recently. I cannot pinpoint the exact time and place when it started, it could have been latest VSCode update.
I've tried reinstalling the extension and doing flutter clean but to no avail. The build runner command from integrated terminal works fine.
How should i diagnose this issue with the extension ? running flutter packages pub run build_runner build --delete-conflicting-outputs works fine generates fine.
Version: 1.55.2 (user setup)
Commit: 3c4e3df9e89829dce27b7b5c24508306b151f30d
Date: 2021-04-13T09:35:57.887Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.18363
Hi there,
I am unable to make this extension work on VS code. I'm not sure what I am missing. Yes, I've read through this readme and and I've read build_runner docs.
I am perfectly able to run build_runner in my project via the command line. At the root of the project, I simply write:
flutter pub run build_runner watch -d
And tadah! Everything works fine.
But as I try to do the same with the extension, either by using the shortcut (CMD+B) or by just clicking watch
on the bottom bar, I receive this output:
Spawning `flutter pub run build_runner watch --delete-conflicting-outputs` in `[absolute-path-of-my-file-system]/[my-project-folder]`
Command exited with code 66
And that's it! Nothing works from there.
What am I missing?
Build runner is running alright. But when I try to "Remove watch" I get the following error dialog in VS Code:
Failed to remove the watch! Try again. If it still doesn't work try closing VSCode and reopening.
Can somebody suggest how to debug this issue?
Thanks.
When pressing "Watch" button on the bottom bar
flutter.bat pub run build_runner watch --delete-conflicting-outputs
in p:\WORK\Maennche\studio
When pressing build shortcut key:
flutter.bat pub run build_runner build --delete-conflicting-outputs
p:\WORK\Maennche\studio
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.