I am working on a electron app, i use electron with react and threejs, now i can not build a windows application anymore. Building an Linux version or a Mac version works fine.
My npm commande is:
$ electron-packager ./build ProjectName --platform=win32 --arch=all --overwrite --packageManager=yarn --prune=true --out=out/windows --asar --icon=icon/icon.png.ico
Now i get following not saying error message.
spawn ENOTDIR
error Command failed with exit code 1.
Related
I am currently learning React, to eventually pair with Ruby on Rails.
I am following the tutorial:
https://www.youtube.com/watch?v=w7ejDZ8SWv8
to get a handle on the language.
I have successfully compiled the build folder, running the command $ npm run build
I have also run the command $ sudo npm i -g serve in my terminal to install the npm serve
when running the build on localhost:8000, using the command $ serve - s -p 8000 in the terminal, it is serving using WEBrick::HTTPServer, throwing the following up in the terminal:
[2022-09-12 15:03:22] INFO WEBrick 1.7.0
[2022-09-12 15:03:22] INFO ruby 3.0.0 (2020-12-25) [x86_64-darwin19]
[2022-09-12 15:03:22] INFO WEBrick::HTTPServer#start: pid=5412 port=8000
which results in localhost:8000 showing:
My question:
Is there a way of altering this so I can serve my react build successfully, without causing issues when I go back to serving my RoR applications later?
React native build fails in pipeline on IOS step
We run ios in the azure devops pipeline with npx react-native run-ios --configuration Release
==============================================================================
Task : Command line
Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version : 2.201.1
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
npx react-native run-ios --configuration Release
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /Users/runner/work/_temp/ae9db986-f3a7-4f07-a6ba-d2250f5bfb5a.sh
info Found Xcode workspace "Navitus.xcworkspace"
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}
error Command failed: open /Applications/Xcode_13.2.1.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID EA2BA6D4-C48C-4C19-A440-403677562929
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}
.
Error: Command failed: open /Applications/Xcode_13.2.1.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID EA2BA6D4-C48C-4C19-A440-403677562929
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}
at checkExecSyncError (child_process.js:790:11)
at Object.execFileSync (child_process.js:827:15)
at runOnSimulator (/Users/runner/work/1/s/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:208:28)
at Object.runIOS [as func] (/Users/runner/work/1/s/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:121:12)
at Command.handleAction (/Users/runner/work/1/s/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:192:23)
at Command.listener (/Users/runner/work/1/s/node_modules/commander/index.js:315:8)
at Command.emit (events.js:400:28)
at Command.parseArgs (/Users/runner/work/1/s/node_modules/commander/index.js:651:12)
at Command.parse (/Users/runner/work/1/s/node_modules/commander/index.js:474:21)
at setupAndRun (/Users/runner/work/1/s/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:271:24)
info Run CLI with --verbose flag for more details.
##[error]Bash exited with code '1'.
Finishing: iOS Build
To resolve "kLSNoExecutableErr: The executable is missing", you can try the following workarounds according to dsame:
retry:
steps:
- name: Open Simulator app
run: |
while ! open -Fn /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app; do
echo "Retry"
done
echo "Success"
Update launch database:
steps:
- name: Open Simulator app
run: |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app
open -Fn /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app
Reference: Launch Services database problems: correcting and rebuilding
I have latest Salesforce CLI version and while creating new project I am getting below error.
Starting SFDX: Create Project
09:17:56.406 sfdx force:project:create --projectname HelloWorld --outputdir d:\lightning Web Componant --template standard
ERROR running force:project:create: Command failed with exit code 1: npm root -g --prefix d:\lightning Web Componant.yo-repository --loglevel error
'npm' is not recognized as an internal or external command,
operable program or batch file.
09:18:07.277 sfdx force:project:create --projectname HelloWorld --outputdir d:\lightning Web Componant --template standard
ended with exit code 1
I have installed node.js from this link https://nodejs.org/en/download/ and also installed "Node.js Extension Pack " to fix the issue.
Installing node.js fixed the error for me.
I have downloaded Dandelion starter-project and decompressed it on a local folder. I ran:
npm i
npm run build:dll
and then
npm start
then it complains:
> dandelion_pro#1.6.1 start /home/......./dandelion/starter-project
> cross-env NODE_ENV=development node server
Happy[js]: Version: 5.0.1. Threads: 5 (shared pool)
Server started ! ✓
Access URLs:
-----------------------------------
Localhost: http://localhost:3001
LAN: http://xxx.xxx.xxx.xxx:3001
-----------------------------------
Press CTRL-C to stop
Webpack is building script...
Happy[js]: All set; signaling webpack to proceed.
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
webpack built 920e70412c607c0d50a6 in 3600ms
✖ 「wdm」:
ERROR in ./app/app.js
Module not found: Error: Can't resolve './.htaccess' in '/home/......./dandelion/starter-project/app'
# ./app/app.js 27:0-48
# multi ./node_modules/react-app-polyfill/ie11.js webpack-hot-middleware/client?reload=true ./app/app.js
I have searched the web looking for a solution, but I was unable to find one. My system is a Ubuntu 18.04.3 based machine running Linux Mint 19.3, nodejs 12.15.0 and npm 6.13.4. How can I solve this?
Well folks after an endless unsuccessful search on the web I created an empty ´.htaccess´ file and placed it into the ´app´ folder. Maybe this is not the better or the elegantest way to do it, but it worked for me.
I am posting this hoping it might be helpful.
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/allen/WebstormProjects/untitled/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
Analyze /Users/allen/WebstormProjects/untitled/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)
The following build commands failed:
PhaseScriptExecution Install\ Third\ Party /Users/allen/WebstormProjects/untitled/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/untitled.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/untitled.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
try this:
> rm -rf ~/.rncache
> rm -rf node_modules
> yarn install
> react-native run-ios
use yarn install replace npm install. I got the exact same error when using npm install, after try yarn install, it finally works for me.
my project dependencies:
"react": "16.0.0-alpha.12"
"react-native": "0.45.1"