Unreal: I get "fatal error: 'IMotionController.h' file not found" when trying to build - dependency-management

The IMotionController.h file is included in my external dependencies folder in Visual Studio, so I can compile my code in the Editor, but when I try to build to an application I get:
fatal error: 'IMotionController.h' file not found
Do I need to include something in my Build.cs dependencies?
Currently, just using the defaults:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore"});

I had to add the HeadMountedDisplay module to the Build.cs:
PublicDependencyModuleNames.AddRange(new string[] { "HeadMountedDisplay", "Core", "CoreUObject", "Engine", "InputCore" });

Related

Why is eslint throwing error for .d.ts files in my node project

I have configured eslint for my typescript node project. There is also a file app.d.ts in the repo. On running the lint, I get the following error
error Parsing error: "parserOptions.project" has been set for #typescript-eslint/parser.
The file does not match your project config: src/app.d.ts.
The file must be included in at least one of the projects provided
I have already tried creating tsconfig.eslint.json and its contents are as follows
{
"extends": "./tsconfig.json",
"include": [ "src/**/*.d.ts", "src/**/*.ts", "src/**/*.unit.test.ts", "jest.config.js", "__tests__/**/*.int.test.ts"],
}
And in the .eslintrc.js, I added the parser option
parserOptions: {
sourceType: 'module',
project: './tsconfig.eslint.json',
tsconfigRootDir: './',
},
But Im still getting this error. What am I missing. Any help would be appreciated.
Does the name of your declaration file shadow a typescript file of the same name?
If so you will get this error. Declaration files are for providing types for javascript files so there isn't the need to provide one for a file written in typescript.

Monaco-Editor fails on oracle jet build/serve when in release mode

I'm trying to implement the Monaco editor within my oracle jet web application. I've tried with the dev and min folders. It works fine when I run serve without the release mode option but when I include --release on build or serve it is throwing the below error
Error: ENOENT: no such file or directory, open '/web/js/libs/vs/editor/edcore.main.js'
I'm not sure why Monaco is needing the file as that file is not included in either the dev or min folders but it is referenced in the "vs/editor/editor.main.js" file and that is where the error is coming from.
Within Oracle Jet for Require JS the info is stored in the path mapping json as follows :
"vs": {
"cdn": "3rdparty",
"cwd": "node_modules/monaco-editor/dev/vs",
"debug": {
"src": ["**"],
"path": "libs/vs/",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "libs/vs",
"cdnPath": ""
}
},
Again, everything is perfect when not optimized into a single js file in the browser using the release option
You should remove the monaco editor library from the optimization.
Add to your before_optimize hook:
configObj.componentRequireJs.paths['vs'] = 'empty:';
configObj.requireJs.paths['vs'] = 'empty:';

Error: Identifier 'Reader' has already been declared while bundling fstream with rollup.js

I'm new with configuring stuff with Rollup, I'm trying to configure a node CLI app to be bundled in a single cli.bundle.js file that would be executable with a simple node cli.bundle.js without needing to npm install anything before.
On a side note, we already have succeed in doing so with zeit/pkg, but we would rather note have all the nodejs executable bundled inside, so we are trying work with rollup instead of pkg.
The problem we encounter is that when going through the different node_modules of the application, rollup.js crash with error:
[!] Error: Identifier 'Reader' has already been declared
../../common/js-common/node_modules/fstream/lib/file-reader.js (7:4)
5: var fs = require("graceful-fs")
6: , fstream = require("../fstream.js")
7: , Reader = fstream.Reader
^
8: , inherits = require("inherits")
9: , mkdir = require("mkdirp")
Error: Identifier 'Reader' has already been declared
at error (/home/.../src/external-data/external-data-etl/node_modules/rollup/dist/shared/node-entry.js:5400:30)
at Module.error (/home/.../src/external-data/external-data-etl/node_modules/rollup/dist/shared/node-entry.js:9820:16)
at tryParse (/home/.../src/external-data/external-data-etl/node_modules/rollup/dist/shared/node-entry.js:9713:23)
at Module.setSource (/home/.../src/external-data/external-data-etl/node_modules/rollup/dist/shared/node-entry.js:10076:33)
at Promise.resolve.catch.then.then.then (/home/.../src/external-data/external-data-etl/node_modules/rollup/dist/shared/node-entry.js:12362:20)
While looking for this error with rollup, it seems people were having it more at execution time than at bundle time, so I have no clue of what I can do. This duplicated identifier is in a 3rd party code I don't control :(
Here is my rollup.config.js
Edit: I tried with the new #rollup/plugins to see if there were a fix in them, but I have still the same issue.
import commonjs from '#rollup/plugin-commonjs';
import resolve from '#rollup/plugin-node-resolve';
import json from '#rollup/plugin-json';
export default {
input: 'dist/index.js',
output: {
format: 'cjs',
file: './cli.bundle.js'
},
plugins: [
commonjs(),
resolve(),
json() // asked and added when parsing 'got' package imported by 'download' package
]
};
And our building process is :
transpile from typescript (src) to js (dist) with tsc
bundle (dist) app into single runnable file
We would rather not include babel or typescript plugin to transpile, to stay independant, and certainly the (dist) app is enough (as it was enough for zeit/pkg).
Is there something we are doing wrong ?
The Problem is your dependency it is not coded in the right way you will need to correct the code error they did.

how to fix "$(__dirname)/src/" path does not exist in the 'gatsby-source-filesystem'

I am new to gatsby. I went through the process of adding gatsby-source-filesystem to gatsby-config.js and I gave it the proper path to where my first test .md file is:
{
resolve: `gatsby-source-filesystem`,
options: {
name: `src`,
path: `$(__dirname)/src/posts`
}
}
However, I keep getting the following error:
The path passed to gatsby-source-filesystem does not exist on your file system: `${__dirname}/src/`
Please pick a path to an existing directory
Can somebody help me understand why this isn't working?

Importing react-native project in android studio

Am having a small problem with opening/importing a react-native into Android studio.
If I open the project using the open a project dialog, it tells me that the project is not gradle enabled and it is such a pain to make and test code changes. Couldn't find out how to enable the project as a gradle project after the fact even after going through the material on the help site.
On the other hand, if I import using the import a gradle project dialog and select the build.gradle file, the project is imported, but I only see the files inside the android directory instead of the main project directory. But this method allows me to push changes easily to the emulator.
How can I fix my problem?
Thanks,
Just import android directory from Android Studio,
make changes to your app/build.gradle
add these codes before apply from: "../../node_modules/react-native/react.gradle"
project.ext.react = [
bundleAssetName: "index.android.bundle",
entryFile: "index.android.js",
bundleInDebug: false,
bundleInRelease: true,
root: "../../",
jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
jsBundleDirRelease: "$buildDir/intermediates/assets/release",
resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
inputExcludes: ["android/", "ios/"],
nodeExecutableAndArgs: ["node"],
extraPackagerArgs: []
]
Now create task for "react-native start" to your gradle
task startReactNative(type: Exec) {
workingDir "../../"
commandLine 'cmd', '/c', 'react-native', 'start'
println "Working Directory for React is: $workingDir"
standardOutput = new ByteArrayOutputStream()
ext.output = {
println "React-Native Output: " + standardOutput.toString()
return standardOutput.toString()
}
}
You can run your app as usual, after app installed to your device, run startReactNative task in order to activate Hot Reload

Resources