brunch build does not create directory and files - hapi.js

I am building a small hapijs app with brunch as asset management tool.
Running brunch build doesnt produce any compiled files.
My project structure is similar like the structure sample in
https://github.com/brunch/brunch/tree/stable/docs
brunch-config.coffee:
exports.config =
server:
path: 'index.js'
port: 8000
paths:
public: 'public'
conventions:
ignored: 'app/templates'
files:
javascripts:
joinTo:
'js/app.js': /^app/
'js/vendor.js': /^vendor/
stylesheets:
defaultExtension: 'css'
joinTo:'css/app.css': /^app/
$brunch build -d produces:
brunch:watch Loaded plugins: +0ms
brunch:watch File 'app' received event 'addDir' +9ms
brunch:watch File 'vendor' received event 'addDir' +20ms
brunch:watch File 'package.json' received event 'add' +4ms
brunch:watch File 'brunch-config.coffee' received event 'add' +0ms
brunch:watch File 'app/assets' received event 'addDir' +5ms
brunch:watch File 'app/templates' received event 'addDir' +1ms
brunch:file-list Reading 'app/style.css' +2ms
brunch:watch File 'app/style.css' received event 'add' +2ms
brunch:watch File 'vendor/css' received event 'addDir' +0ms
brunch:watch File 'vendor/scripts' received event 'addDir' +1ms
brunch:watch File 'app/assets/images' received event 'addDir' +4ms
brunch:file-list Reading 'app/templates/index.html' +1ms
brunch:watch File 'app/templates/index.html' received event 'add' +0ms
brunch:file-list Reading 'vendor/css/normalize.css' +0ms
brunch:watch File 'vendor/css/normalize.css' received event 'add' +0ms
brunch:file-list Reading 'vendor/css/skeleton.css' +0ms
brunch:watch File 'vendor/css/skeleton.css' received event 'add' +0ms
'add' +1ms
brunch:file-list Reading 'vendor/scripts/jquery-1.11.2.min.js' +0ms
brunch:watch File 'vendor/scripts/jquery-1.11.2.min.js' received event 'add' +0ms
Do I miss something?
Thanks for any help

Apparantly I have to install mandatory plugin first such javascript-brunch and css-brunch( or any [style-language]-brunch plugin depending on your style language).
This thing are subtle and it's not described explicitly in brunch docs. Had to reread and reread again of brunch guide https://github.com/brunch/brunch-guide/blob/master/content/en/chapter04-starting-from-scratch.md to get the 'aha' moment.

Related

WebdriverIo is not able to initialize wdio-rerun-service : Getting below error

[0-13] 2022-05-25T04:33:05.332Z DEBUG #wdio/utils:initialiseServices: initialise service "selenium-standalone" as NPM package
[0-13] 2022-05-25T04:33:05.350Z DEBUG #wdio/utils:initialiseServices: initialise service "RerunService" as NPM package
[0-13] 2022-05-25T04:33:05.351Z ERROR #wdio/utils:initialiseServices: Error: Couldn't find plugin "RerunService" service, neither as wdio scoped package "#wdio/rerunservice-service" nor as community package "wdio-rerunservice-service". Please make sure you have it installed!
at Object.initialisePlugin [as default] (/Users//dotor/dot-or-automation/node_modules/#wdio/runner/node_modules/#wdio/utils/build/initialisePlugin.js:26:11)
at initialiseServices (/Users/****/dotor/dot-or-automation/node_modules/#wdio/runner/node_modules/#wdio/utils/build/initialiseServices.js:24:51)
at Object.initialiseWorkerService (/Users//dotor/dot-or-automation/node_modules/#wdio/runner/node_modules/#wdio/utils/build/initialiseServices.js:67:26)
at Runner.run (/Users/*******/dotor/dot-or-automation/node_modules/#wdio/runner/build/index.js:43:17)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-13] Capabilities: {"maxInstances":2,"browserName":"chrome","acceptInsecureCerts":true,"goog:chromeOptions":{}}
[0-13] 2022-05-25T04:33:05.437Z DEBUG #wdio/sync: Finished to run "beforeSession" hook in 0ms
2022-05-25T04:33:05.800Z DEBUG #wdio/local-runner: Runner 0-13 finished with exit code 0
2022-05-25T04:33:05.800Z INFO #wdio/cli: [0-13] SKIPPED in chrome - /automation/features/ui/Others/setting-wheel.feature
2022-05-25T04:33:05.800Z INFO #wdio/cli:launcher: Run onWorkerEnd hook
Not sure if you already found your answer for this but if you haven't. The webdriverio doc explains it well.
// wdio.conf.js
const RerunService = require('wdio-rerun-service');
export.config = {
// ...
services: [RerunService, {
// ...
}]
};
This service is slightly configured differently compared to the other ones.
Note that we are importing the service and using it in the config object. Other services are usually called directly after installation, and the name of the service is usually a string example:
export.config = {
// ...
services: ["selenium-standalone", {
// ...
}]
};

Error when trying to add a custom font "The "path" argument must be of type string"

I'm trying to add a custom font to my react native project, I already put the Bungee.ttf on the
assets/fonts foulder and edit the react-native-config.js file:
project: {
ios: {},
android: {}, // grouped into "project"
},
assets: ['./assets/fonts/'], // stays the same
};
but after npx react-native link this error occurs on console:
error The "path" argument must be of type string. Received undefined.
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:119:11)
at Object.basename (node:path:752:5)
at \node_modules\react-native\node_modules\#react-native-community\cli\build\commands\link\linkAll.js:62:78
npm info react-scripts version: 4.0.3
node version: v16.10.0
How to fix this??
Add the following file in the main folder (under index.js) then try react-native link
file name: react-native.config.js
module.exports = {
project: {
ios: {},
android: {}, // grouped into "project"
},
assets: ["./assets/fonts/"], // stays the same
};

When Unit Testing with headless chrome, Vuex Store is undefined

I'm just trying to test a simple component. I inherited a project and it was set up with Vue CLI 2 and it looks very boilerplatey. My issue is I'm trying to unit test anything I devote to the project. However, I'm having issues with the vuex store coming up as undefined. It's preventing me from testing and I haven't figured it out yet.
I googled around and found multiple things including this. Vue.js and vuex: this.$store is undefined
This is the error message I'm receiving
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
07 08 2019 14:52:06.948:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/07 08 2019 14:52:06.958:INFO [launcher]: Launching browser ChromeHeadless with unlimited
concurrency
07 08 2019 14:52:07.006:INFO [launcher]: Starting browser ChromeHeadless
07 08 2019 14:52:17.675:INFO [HeadlessChrome 75.0.3770 (Windows 10.0.0)]: Connected on socket KXXgp_cAT4JbkbufAAAA with id 2108708
HeadlessChrome 75.0.3770 (Windows 10.0.0) WARN LOG: '[vue-router] Duplicate named routes
definition: { name: "load-balancing", path: "/networking/load-balancing/:ServiceRequestId/edit" }'
07 08 2019 14:52:20.798:WARN [web-server]: 404: /static/img/oops.png
HeadlessChrome 75.0.3770 (Windows 10.0.0) WARN LOG: '[vue-router] Duplicate named routes
definition: { name: "resource-groups", path: "/portal/resource-groups/:ResourceGroupId" }'
HeadlessChrome 75.0.3770 (Windows 10.0.0) WARN LOG: '[vue-router] Duplicate named routes
definition: { name: "manage-service-offerings", path: "/portal/admin/service-offerings/new" }'
HeadlessChrome 75.0.3770 (Windows 10.0.0) WARN LOG: '[vue-router] Duplicate named routes
definition: { name: "manage-service-offerings", path: "/portal/admin/service-offerings/:Id" }'
HeadlessChrome 75.0.3770 (Windows 10.0.0) ERROR LOG: '[Vue warn]: Cannot find element: #app'
HeadlessChrome 75.0.3770 (Windows 10.0.0) WARN LOG: '[Vuetify] Unable to locate target [data-app]
found in
---> <VDialog>
<VApp>
<App> at src/App.vue
<Root>'
HeadlessChrome 75.0.3770 (Windows 10.0.0) WARN LOG: '[Vuetify] Unable to locate target [data-app]
found in
---> <VDialog>
<VApp>
<App> at src/App.vue
<Root>'
ERROR LOG: '[Vuetify] Image load failed
src: /static/img/oops.png
found in
---> <VImg>
<VCard>
<ThemeProvider>
<VDialog>
<VApp>
<App> at src/App.vue
<Root>'
ERROR LOG: '[Vue warn]: Error in config.errorHandler: "TypeError: Cannot read property 'state' of undefined"'
ERROR LOG: TypeError{}
ERROR LOG: '[Vue warn]: Error in render: "TypeError: Cannot read property 'state' of undefined"
found in
---> <UserDropdownMenu> at src/components/common/UserDropDownMenu.vue
<Root>'
ERROR LOG: TypeError{}
User.vue
× should have a default value of false for user-menu
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (webpack:///node_modules/vuex/dist/vuex.esm.js:791:0 <- index.js:5858:31)
at Watcher.get (webpack:///node_modules/vue/dist/vue.esm.js:3142:0 <- index.js:10010:25)
at Watcher.evaluate (webpack:///node_modules/vue/dist/vue.esm.js:3249:0 <- index.js:10117:21)
at VueComponent.computedGetter [as User] (webpack:///node_modules/vue/dist/vue.esm.js:3507:0 <- index.js:10375:17)
at VueComponent.userPhoto (webpack:///src/components/common/UserDropDownMenu.vue:35:0 <- index.js:25280:49)
at Watcher.get (webpack:///node_modules/vue/dist/vue.esm.js:3142:0 <- index.js:10010:25)
at Watcher.evaluate (webpack:///node_modules/vue/dist/vue.esm.js:3249:0 <- index.js:10117:21)
at VueComponent.computedGetter [as userPhoto] (webpack:///node_modules/vue/dist/vue.esm.js:3507:0 <- index.js:10375:17)
at Object.get (webpack:///node_modules/vue/dist/vue.esm.js:1943:0 <- index.js:8811:20)
at Proxy.render (webpack:///src/components/common/UserDropDownMenu.vue?bfff:19:26 <- index.js:85974:37)
HeadlessChrome 75.0.3770 (Windows 10.0.0): Executed 1 of 1 (1 FAILED) ERROR (0.746 secs / 0.01 secs)
I just want to know why store isn't rendering correctly
Here is the simple test that I wrote
import {expect} from 'chai'
import {shallowMount} from '#vue/test-utils'
import UserDropDownMenu from '#/components/common/UserDropDownMenu.vue'
describe('User.vue', () => {
it('should have a default value of false for user-menu', () => {
const wrapper = shallowMount(UserDropDownMenu)
const vm = wrapper.vm
const data = vm.$data
expect(data.UserDropDownMenu).to.equal(false)
})
})

ReferenceError: ReadableStream is not defined while running jest tests

My web app reads local files using a custom ReadableStream (in-order that I won't need to have a max file size that the platform supports) and it works great, both for correctly formatted files and error files. My app is built using React-Redux-Saga.
I'm now attempting to add limited e2e tests to my code to test the state management. I'm testing that when sending redux actions the state updates correctly. I'm testing the saga's using the package redux-saga-tester.
While running the jest client tests that read local files using the ReadableStream I built, I got an error ReferenceError: ReadableStream is not defined. What I understood is that the jsdom environment that jest uses is missing the ReadableStream implementation. I than added the web-streams-polyfill package to polyfill the ReadableStream class.
Now the validate file test is passing as in the browser:
test('Select and validate log file', async () => {
const testFile = testFileBuilder.valid();
storeTester.dispatch(fileSelected(testFile));
await storeTester.waitFor(FILE_VALIDATED);
const state = storeTester.getState().file;
expect(state.fileValidated).toBeTruthy();
});
My problem is that when I run a second validation test with an invalid file the test passes but prints an error to the console.
The test:
test('Select an invalid file - JSON error', async () => {
const testFile = testFileBuilder.errorJSON();
storeTester.dispatch(fileSelected(testFile));
await storeTester.waitFor(FILE_ERROR);
const state = storeTester.getState().file;
expect(state.fileValidated).toBeFalsy();
expect(state.fileError).toBeTruthy();
});
The error that is printed after the test completes successfully:
e.error node_modules/jsdom/lib/jsdom/virtual-console.js:29
Error: Error: connect ECONNREFUSED 127.0.0.1:80
at Object.dispatchError (/home/noams/dev/web/visual-log-viewer/client/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
at Request.client.on.err (/home/noams/dev/web/visual-log-viewer/client/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
at Request.emit (events.js:194:15)
at Request.onRequestError (/home/noams/dev/web/visual-log-viewer/client/node_modules/request/request.js:881:8)
at ClientRequest.emit (events.js:189:13)
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19) undefined
Any subsequent file validation tests fail.
I'd appreciate any advice of how to tackle this issue.

ovirt:create iso/nfs storage domain erro

I met a problem while creating
"New Domain" iso/nfs storage,it prints "Error while executing action
New NFS Storage Domain: Storage domain remote path not mounted"
and the error code is 477.
I followed the "http://wiki.ovirt.org/wiki/Troubleshooting_NFS_Storage_Issues" and find that the vdsm user can't now use mount.
"mount: only root can do that"
the version I use:
oVirt Engine Version: 3.1.0-2.fc17
oVirt Node Hypervisor 2.5.4-0.1.fc17
the error log:
2012-11-08 09:15:00,004 INFO [org.ovirt.engine.core.bll.AutoRecoveryManager] (QuartzScheduler_Worker-77) Checking autorecoverable storage domains done
2012-11-08 09:17:28,920 WARN [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp--0.0.0.0-8009-2) calling GetConfigurationValueQuery (StorageDomainNameSizeLimit) with null version,
using default general for version
2012-11-08 09:17:29,333 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.ValidateStorageServerConnectionVDSCommand] (ajp--0.0.0.0-8009-3) [7720b88f] START, ValidateStorageServerConnectionVDSCommand(vdsId = 12bcf124-29a4-11e2-bcba-00505680002a, storagePoolId = 00000000-0000-0000-0000-000000000000, storageType = NFS, connectionList = [{ id: 6556c55d-42a4-4dcc-832c-4d8987ebe6bd, connection: 200.200.101.219:/usr/lwq/iso };]), log id: 52777a80
2012-11-08 09:17:29,388 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.ValidateStorageServerConnectionVDSCommand] (ajp--0.0.0.0-8009-3) [7720b88f] FINISH, ValidateStorageServerConnectionVDSCommand, return: {6556c55d-42a4-4dcc-832c-4d8987ebe6bd=0}, log id: 52777a80
2012-11-08 09:17:29,392 INFO [org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] (ajp--0.0.0.0-8009-3) [7720b88f] Running command: AddStorageServerConnectionCommand internal: false. Entities affected : ID: aaa00000-0000-0000-0000-123456789aaa Type: System
2012-11-08 09:17:29,404 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (ajp--0.0.0.0-8009-3) [7720b88f] START, ConnectStorageServerVDSCommand(vdsId = 12bcf124-29a4-11e2-bcba-00505680002a, storagePoolId = 00000000-0000-0000-0000-000000000000, storageType = NFS, connectionList = [{ id: 6556c55d-42a4-4dcc-832c-4d8987ebe6bd, connection: 200.200.101.219:/usr/lwq/iso };]), log id: 36cb94f
2012-11-08 09:17:29,656 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (ajp--0.0.0.0-8009-3) [7720b88f] FINISH, ConnectStorageServerVDSCommand, return: {6556c55d-42a4-4dcc-832c-4d8987ebe6bd=477}, log id: 36cb94f
2012-11-08 09:17:29,658 ERROR [org.ovirt.engine.core.bll.storage.NFSStorageHelper] (ajp--0.0.0.0-8009-3) [7720b88f] The connection with details 200.200.101.219:/usr/lwq/iso failed because of
error code 477 and error message is: 477
2012-11-08 09:17:29,717 INFO [org.ovirt.engine.core.bll.storage.AddNFSStorageDomainCommand] (ajp--0.0.0.0-8009-11) [1661aa36] Running command: AddNFSStorageDomainCommand internal: false. En
tities affected : ID: aaa00000-0000-0000-0000-123456789aaa Type: System
2012-11-08 09:17:29,740 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] (ajp--0.0.0.0-8009-11) [1661aa36] START, CreateStorageDomainVDSCommand(vdsId = 12bcf12
4-29a4-11e2-bcba-00505680002a, storageDomain=org.ovirt.engine.core.common.businessentities.storage_domain_static#4a900545, args=200.200.101.219:/usr/lwq/iso), log id: 50b803a0
2012-11-08 09:17:35,233 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (ajp--0.0.0.0-8009-11) [1661aa36] Failed in CreateStorageDomainVDS method
2012-11-08 09:17:35,234 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (ajp--0.0.0.0-8009-11) [1661aa36] Error code StorageDomainFSNotMounted and error message VDSGeneri
cException: VDSErrorException: Failed to CreateStorageDomainVDS, error = Storage domain remote path not mounted: ('/rhev/data-center/mnt/200.200.101.219:_usr_lwq_iso',)
2012-11-08 09:17:35,260 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (ajp--0.0.0.0-8009-11) [1661aa36] Command org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageD
omainVDSCommand return value
As far as I know VDSM does sudo to run privileged commands, but still that mount error is strange. Can you send share the vdsm log?
Also, you may get more attention on the engine-users or vdsm mailing lists.