I'm trying to install Node.js on Centos 5.5, which the latest update has removed yum.
So when i'm trying to run make I get the following error. Any ideas why, or what is going on?
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/usr/local/src/node-v0.12.0/out'
LD_LIBRARY_PATH=/usr/local/src/node-v0.12.0/out/Release/lib.host:/usr/local/src/node-v0.12.0/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /usr/local/src/node-v0.12.0/out/Release/obj/gen; python ../../tools/js2c.py "/usr/local/src/node-v0.12.0/out/Release/obj/gen/libraries.cc" CORE off ../../src/runtime.js ../../src/v8natives.js ../../src/symbol.js ../../src/array.js ../../src/string.js ../../src/uri.js ../../third_party/fdlibm/fdlibm.js ../../src/math.js ../../src/messages.js ../../src/apinatives.js ../../src/debug-debugger.js ../../src/mirror-debugger.js ../../src/liveedit-debugger.js ../../src/date.js ../../src/json.js ../../src/regexp.js ../../src/arraybuffer.js ../../src/typedarray.js ../../src/weak_collection.js ../../src/promise.js ../../src/object-observe.js ../../src/collection.js ../../src/collection-iterator.js ../../src/macros.py ../../src/array-iterator.js ../../src/string-iterator.js
File "../../tools/js2c.py", line 409
except Error as e:
^
SyntaxError: invalid syntax
make[1]: *** [/usr/local/src/node-v0.12.0/out/Release/obj/gen/libraries.cc] Error 1
make[1]: Leaving directory `/usr/local/src/node-v0.12.0/out'
make: *** [node] Error 2
I'm encountering the same issue on RHEL5. I found a work-around until this gets fixed upstream. Edit deps/v8/tools/gyp/v8.gyp and replace 'python' with 'python2.7' to force that stage of the compile to use the correct version of python.
I filed an upstream bug at https://github.com/joyent/node/issues/9217
Related
I am trying to run my project to Xcode 13.1 but the problem is that build is failing with message:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Ajman.xcworkspace. Run CLI with --verbose flag for more details.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace Ajman.xcworkspace -configuration Debug -scheme Ajman -destination id=6C41B609-DA05-4FAD-98F3-CC0264871189
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: 1552deb311feffa24b258a2f780d63f1
Build description path: /Users/younisrahman/Library/Developer/Xcode/DerivedData/Ajman-gmdogtmpvnnzkcfzhirvzdbwaslh/Build/Intermediates.noindex/XCBuildData/1552deb311feffa24b258a2f780d63f1-desc.xcbuild
note: Build preparation complete
note: Building targets in parallel
CompileC /Users/younisrahman/Library/Developer/Xcode/DerivedData/Ajman-gmdogtmpvnnzkcfzhirvzdbwaslh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Volumes/Software/Projects/React-Native/Ajman/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
cd /Volumes/Software/Projects/React-Native/Ajman/ios/Pods
export LANG\=en_US.US-ASCII
.
.
.
.
.
The following build commands failed:
CompileC /Users/younisrahman/Library/Developer/Xcode/DerivedData/Ajman-gmdogtmpvnnzkcfzhirvzdbwaslh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Volumes/Software/Projects/React-Native/Ajman/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
(1 failure)
# Add this code bottom in Podfile
post_install do |installer|
#Fix after updating to Xcode 13.1
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))")
end
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end
# If not work try this
change a parameter cast in the React module RCTTurboModuleManager.mm,
RCTBridgeModuleNameForClass(strongModule))
to
RCTBridgeModuleNameForClass(Class(strongModule)))
Hi guys its my first time trying digital ocean,
I am deploying my app via Launch App and my code are hosted on github however when i try importing the code and building i am getting the below error and i have no idea what that is
Please help
2021-08-03T21:47:06.796342084Z => Initializing build
2021-08-03T21:47:06.832099453Z => Retrieving source code to /workspace
2021-08-03T21:47:06.860459803Z => Selecting branch "main"
2021-08-03T21:47:09.561399472Z => Checking out commit "9be192339cd0a8c93919eaf5959bd43c5ff06927"
2021-08-03T21:47:12.318858786Z => Got source_dir: /
2021-08-03T21:47:12.344366201Z => Using workspace root /workspace
2021-08-03T21:47:12.414846752Z
2021-08-03T21:47:12.414907116Z => Building app using buildpacks
2021-08-03T21:47:12.704652275Z => Injecting app environment variables:
2021-08-03T21:47:12.704707986Z QUEUE_CONNECTION DB_HOST SESSION_LIFETIME TWILIO_ACCOUNT_SID SENTRY_TRACES_SAMPLE_RATE APP_URL SENTRY_LARAVEL_DSN TWILIO_AUTH_TOKEN MAIL_MAILER TEXTTAWK_ENVIRONMENT DB_PASSWORD API_SECRET TWILIO_PHONE_NUMBER PERSONAL_CLIENT_ID MAIL_USERNAME MAIL_FROM_ADDRESS PERSONAl_CLIENT_SECRET MULTI_DB_ENABLED BROADCAST_DRIVER APP_ENV GOOGLE_CLIENT_ID EXPANDED_LOGGING ERROR_EMAIL MAIL_PASSWORD GOOGLE_CLIENT_SECRET APP_NAME TRUSTED_PROXIES MAIL_HOST DB_CONNECTION APP_DEBUG DB_USERNAME GOOGLE_REDIRECT_URI APP_KEY CACHE_DRIVER MAIL_ENCRYPTION SESSION_DRIVER INTERNAL_QUEUE_ENABLED MAIL_FROM_NAME DB_PORT DB_DATABASE MAIL_PORT TEXTTAWK_ORGANIZATION_ID
2021-08-03T21:47:12.736297358Z => Configuring custom build command to be run at the end of the build:
2021-08-03T21:47:12.761828497Z composer install
2021-08-03T21:47:13.365839056Z => Running buildpack detection
2021-08-03T21:47:13.365923629Z
2021-08-03T21:47:14.074627212Z heroku/nodejs-engine 0.5.0
2021-08-03T21:47:14.074682595Z digitalocean/node 0.3.4
2021-08-03T21:47:14.074757668Z digitalocean/php-appdetect 0.0.3
2021-08-03T21:47:14.074803894Z heroku/php 0.188.4
2021-08-03T21:47:14.075038595Z digitalocean/procfile 0.0.3
2021-08-03T21:47:14.075058351Z digitalocean/custom 0.1.0
2021-08-03T21:47:14.202672749Z
2021-08-03T21:47:14.202717224Z For documentation on the buildpacks used to build your app, please see:
2021-08-03T21:47:14.202743590Z Node.js: https://do.co/apps-buildpack-node
2021-08-03T21:47:14.202798824Z PHP: https://do.co/apps-buildpack-php
2021-08-03T21:47:14.818696983Z
2021-08-03T21:47:14.818882813Z => Building app
2021-08-03T21:47:14.818924263Z
2021-08-03T21:47:15.093655477Z ---> Node.js Buildpack
2021-08-03T21:47:15.108387965Z ---> Installing toolbox
2021-08-03T21:47:15.129668030Z ---> - jq
2021-08-03T21:47:15.847171368Z ---> - yj
2021-08-03T21:47:16.137897473Z ---> Getting Node version
2021-08-03T21:47:16.185826122Z ---> Resolving Node version
2021-08-03T21:47:18.820896954Z ---> Downloading and extracting Node v12.22.4
2021-08-03T21:47:33.310168979Z ---> Parsing package.json
2021-08-03T21:47:34.458500684Z ---> No file to start server
2021-08-03T21:47:34.458547440Z ---> either use 'docker run' to start container or add index.js or server.js
2021-08-03T21:47:34.543028305Z Error: package-lock.json does not exist. Please commit either a package-lock.json or yarn.lock file to your repository and try again.
2021-08-03T21:47:34.543513537Z project does not contain a package manager lockfile
2021-08-03T21:47:34.546474624Z [31;1mERROR: [0mfailed to build: exit status 1
2021-08-03T21:47:37.973947707Z
2021-08-03T21:47:37.974088341Z For documentation on the buildpacks used to build your app, please see:
2021-08-03T21:47:37.974111872Z Node.js: https://do.co/apps-buildpack-node
2021-08-03T21:47:37.974199168Z PHP: https://do.co/apps-buildpack-php
2021-08-03T21:47:37.977558349Z
2021-08-03T21:47:37.977966439Z [31m ! Build failed (145)[0m
For anyone who might face this same challenge in the future,
for me the problem was "package.json"
if you deploying a Laravel API you need to delete the package.json file from your project. For me that was the issue that was preventing my project from building
Happy coding
I had a similar error and fixed it a different way. Since the error said "package-lock.json does not exist.", I added a package-lock.json file by running the npm install command in the root directory of the app, the one with the package.json file. After that the app deployed successfully.
Running this command using spawnSync use to work before I added in npx.
spawnSync(`npx git add-coauthor ${commandKey} "${name}" ${email}`)
Now I get an error from the git-mob cli saying Incorrect Number of Parameters. It sees four instead of three after add-coauthor it seems like it's ignoring the double quotes around name.
Error: "Incorrect Number of Parameters [ 'zsgi', 'first', 'lastname', 'someone#email.com' ]\n"
Things I've tried but I get the same error:
spawnSync(
"npx",
["git", "add-coauthor", commandKey, `"${name}"`, email]
);
spawnSync(
`npx git add-coauthor "${commandKey} \"${name}\" ${email}"`
);
If I run Git Mob cli command directly in the terminal this works:
npx git add-coauthor "jsj \"alsk la\" sls#al.com"
Grateful for any suggestions.
The code can be found here.
Edits: More info
This could be related to Windows 10 cmd as it seems to work fine on Mac OS.
Node version: 12.11.0
Npm version: 6.11.3
I am trying to publish npm package, when i am install the package globally and try to run the cli command i get this errors:
/.nvm/versions/node/v0.12.2/bin/myPack: line 1: use strict: command not found
/.nvm/versions/node/v0.12.2/bin/myPack: line 3: syntax error near unexpected token `('
/.nvm/versions/node/v0.12.2/bin/myPack: line 3: `var _commandLineArgs = require('command-line-args');'
The top of the file that the error refer to:
'use strict';
var _commandLineArgs = require('command-line-args');
var _commandLineArgs2 = _interopRequireDefault(_commandLineArgs);
The package.json bin section:
"bin": {
"myPack": "dist/myPack.js"
}
When i am running this in my local development this works well, what is the problem?
Your script should start with a shebang line, otherwise it will be executed as a shell script (hence the errors).
Add this as first line to dist/myPack.js:
#!/usr/bin/env node
I try to install node-v0.10.26-x64.msi and cordova(PhoneGap) 3.4.0 for Windows 8. But it occurs an error on Windows 8.1(x64).
This is a result on Windows 8.1 command prompt(as an Administrator) for building:
C:\Windows\system32>npm install -g cordova
C:\Windows\system32>cd c:\data
c:\Data>cordova create abc com.aaa.bbb ccc
c:\Data>cd abc
c:\Data\abc>cordova platform add windows8
Project created
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: ]
c:\Data\abc>cordova build
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: ]
Running command: cmd args=["/c","c:\\Data\\abc\\platforms\\windows8\\cordova\\bu
ild"]
cordova library for "windows8" already exists. No need to download. Continuing.
Generating config.xml from defaults for platform "windows8"
Calling plugman.prepare for platform "windows8"
Preparing windows8 project
Procesabcg configuration changes for plugins.
creating jsproj from project at : C:\Data\abc\platforms\windows8\CordovaApp.jspr
oj
Iterating over installed plugins: []
Writing out cordova_plugins.js...
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: �]
Running command: cmd args=["/c","C:\\Data\\abc\\platforms\\windows8\\cordova\\bu
ild"]
c:\Data\abc\platforms\windows8\cordova\lib\build.js(57, 5) WshShell.Exec: file not found
Non-whitespace issue was solved by adding "contents = contents.substring(contents.indexOf("<"));" to "contents = fs.readFileSync(filename, 'utf-8')" into "node_modules\cordova..\xml-helpers.js".
But "build.js(57, 5) WshShell.Exec" error is not resolve.