So I have been trying for the last 3 hours to get web storm set up on my new mac. I'm having trouble getting the iOS-sim set up and it just gives me an error
Failed at the ios-sim#3.1.1 preinstall script 'rake build'.
npm ERR! This is most likely a problem with the ios-sim package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rake build
npm ERR! You can get their info via:
npm ERR! npm owner ls ios-sim
npm ERR! There is likely additional logging output above.
I've tried every google link out there and I still am at a loss.
Any thoughts?
Here is an error message I get when installing phonegap
Brentons-MBP:~ brentonpierce$ sudo npm install -g phonegap
Password:
npm WARN engine npm#1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.3","npm":"2.7.5"})
npm WARN engine cordova-js#3.9.0: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.3","npm":"2.7.5"})
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.3","npm":"2.7.5"})
> ws#0.4.31 install /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/engine.io/node_modules/ws > (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
npm WARN installMany normalize-package-data was bundled with npm#1.3.4, but bundled package wasn't found in unpacked tree
> ws#0.4.31 install /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws > (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o /usr/local/bin/phonegap -> /usr/local/lib/node_modules/phonegap/bin/phonegap.js
phonegap#5.0.0-0.28.0 /usr/local/lib/node_modules/phonegap
├── pluralize#0.0.4
├── colors#0.6.0-1
├── semver#1.1.0
├── minimist#0.1.0
├── qrcode-terminal#0.9.4
├── shelljs#0.1.4
├── phonegap-build#0.9.1 (colors#0.6.2, qrcode-terminal#0.8.0, shelljs#0.0.9, optimist#0.3.7, phonegap-build-api#0.3.3)
├── prompt#0.2.11 (revalidator#0.1.8, pkginfo#0.3.0, read#1.0.5, winston#0.6.2, utile#0.2.1)
├── cordova#5.0.0 (underscore#1.7.0, q#1.0.1, nopt#3.0.1, cordova-lib#5.0.0)
└── connect-phonegap#0.16.0 (home-dir#0.1.2, connect-inject#0.3.2, ip#0.3.1, walkdir#0.0.8, request-progress#0.3.1, shelljs#0.2.6, http-proxy#1.8.1, request#2.33.0, tar#0.1.19, node-static#0.7.0, gaze#0.4.3, localtunnel#1.3.0, archiver#0.14.3, useragent#2.0.8, connect#2.12.0, socket.io#1.0.4)
Xcode 6 is required for ios-sim to work.
Please check that you have it installed.
If it is installed, run it at least once.
Related
The SAFE Stack Documentation says to install npm (amongst other things) as a pre-requisite to build SAFE apps. But the link refers to https://www.npmjs.com where you have to search for packages. But which ones? What to install? There are thousands of packages there.
UPDATE:
I have just noticed that the npm documentation says that npm comes bundled with node, & most third-party distributions, by default. So why does the SAFE Stack documentation show the link to npm? Is there any sense in it?
I have tried to install the npm package via NuGet. But whatever I do, running the SAFE standard template in VS ends with a NullReferenceException:
File helpers.fs
let runOrDefault args =
try
match args with
| [| target |] -> Target.runOrDefault target
| _ -> Target.runOrDefault "Run" //NullReferenceException
0
with e ->
printfn "%A" e
1
Entering dotnet run through a command prompt opens a console window containing these messages:
Starting target 'InstallClient'
.> "C:\Program Files\nodejs\npm.CMD" install (In: false, Out: false, Err: false)
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: undefined
npm ERR! notsup Not compatible with your version of node/npm: undefined
npm ERR! notsup Required: {"node":"~16","npm":"~8"}
npm ERR! notsup Actual: {"npm":"8.19.2","node":"v19.0.0"}
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2022-11-04T11_38_04_408Z-debug-0.log
Finished (Failed) 'InstallClient' in 00:00:02.0540071
UPDATE:
In line with Tomáš Petříček's recommendation, I installed this version of node.js: Latest LTS Version: 18.12.0 (includes npm 8.19.2)
But again, NullReferenceException in VS, and the following error messages appear when using the command prompt:
Starting target 'InstallClient'
.> "C:\Program Files\nodejs\npm.CMD" install (In: false, Out: false, Err: false)
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: undefined
npm ERR! notsup Not compatible with your version of node/npm: undefined
npm ERR! notsup Required: {"node":"~16","npm":"~8"}
npm ERR! notsup Actual: {"npm":"8.19.2","node":"v18.12.0"}
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2022-11-04T13_19_03_959Z-debug-0.log
Finished (Failed) 'InstallClient' in 00:00:01.9942657
---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target Duration
------ --------
Clean 00:00:00.5118885
InstallClient 00:00:01.9937254 (Process exit code '1' <> 0. Command Line: C:\Program Files\nodejs\npm.CMD install)
Run 00:00:00 (skipped)
Total: 00:00:02.6111670
Status: Failure
---------------------------------------------------------------------
Fake.Core.BuildFailedException: Target 'InstallClient' failed.
I think all you need to install is Node.js from the official download page There are two versions:
LTS (stable) - version 18 and
Current (development) - version 19
I previously installed "Current" and then run into various troubles (though different ones than you are reporting). You also seem to have 19 according to the log. I gave up with Current and reverted my setup to the LTS version. So perhaps uninstalling the Node version you have right now and installing Node LTS may help.
These adaptations made it possible to run the SAFE standard template on my PC in line with the Quick Start guidelines:
Pre-requisites:
The .NET 6 SDK //OK
node.js (>= 8.0) //OK
npm //do not use this link
Azure CLI (optional - required for Azure deployments) //OK
Continue with guidlines 1 to 6 in the "Create your first SAFE app" section. Use cmd for the dotnet run command.
Look at the node and npm versions in this error message example:
npm ERR! notsup Actual: {"npm":"8.19.2","node":"v18.12.0"}
You may have different versions of npm and node, of course.
In line with this article by Adam Johnson, do this:
Open package.json in the root folder of the template and change the versions of npm and node accordingly, like this:
"private": true,
"engines": {
"node": "18.x",
"npm": "8.x"
}
To suppress warnings, you may add *.npmrc file containing the text string engine-strict=true next to the package.json file.
This answer, however, does not solve the problem why there is a link to npm in the pre-requisites section.
The solution in this answer looks somewhat complicated so if you have got a better idea, it will be fine if you publish it.
UPDATE 08-Nov-2022
Instructions telling you how to run/debug a SAFE Stack app in Visual Studio are here. Then no more problems with NullReferenceExceptions.
I've made everything from https://devexpress.github.io/testcafe/documentation/guides/continuous-integration/jenkins.html. But builds fails always:
node --version
v14.2.0
npm --version
6.14.4
grunt --version
grunt-cli v1.2.0
bower --version
1.8.8
npm install testcafe testcafe-reporter-xunit
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
core-js#2.6.11 postinstall /var/lib/jenkins/jobs/testcafe/workspace/node_modules/core-js
node -e "try{require('./postinstall')}catch(e){}"
npm WARN saveError ENOENT: no such file or directory, open '/var/lib/jenkins/jobs/testcafe/workspace/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/var/lib/jenkins/jobs/testcafe/workspace/package.json'
node_modules/.bin/testcafe chrome tests/smokeTest.js -r xunit:res.xml -s takeOnFails=true
/tmp/jenkins4618268829523592648.sh: 20: /tmp/jenkins4618268829523592648.sh: node_modules/.bin/testcafe: not found
Build step 'Execute shell' marked build as failure
Recording test results
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
What am I doing wrong?
My JS project uses a NPM package called commitizen:
https://github.com/commitizen/cz-cli
commitizen is added to my devDependencies in package.json file.
commitizen uses internally a package called opencollective as you can see here: https://github.com/commitizen/cz-cli/blob/master/package.json
commitizen on postinstall hook is calling opencollective postinstall which is supposed to run opencollective package binary.
Locally I've no problems running the postinstall hook, however, when I build my project on my Jenkins CI box I get this error when it runs the postinstall hook of commitizen package
sh: 1: opencollective: not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! commitizen#2.10.1 postinstall: `opencollective postinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the commitizen#2.10.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried to add node_modules/opencollective/dist/bin dir to the PATH but with no luck, I think because the opencollective alias is defined in opencollective package.json
Any idea about how to be able to run opencollective command without installing globally opencollective package?
Thank you!
I'm following the guidelines for setting up the NPM feed
and connecting to it.
https://www.visualstudio.com/en-us/docs/package/npm/npmrc
I've also got the 'Auth-Token' generated as part of the 'Connect to Feed' dialog and updated my user '.npmrc' file with the token following the instructions provided.
My 'NodeJs' is latest version as well.
My OS is : Win7 64x
I want to publish standard NPM packages to TFS to be used for Build as our build system is isolated from internet.
Here is the error I get when I publish a package.
C:\Users\user\Source\Repos\project\Node\node_modules\which>npm publ
ish
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "publish"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ENEEDAUTH
npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\userAppData\Roaming\npm-cache\_logs\2017-
05-19T20_40_46_348Z-debug.log
My config settings:
C:\Users\user\Source\Repos\project\Node\node_modules\which>npm conf
ig list
; cli configs
scope = ""
user-agent = "npm/4.2.0 node/v7.10.0 win32 x64"
; userconfig C:\Users\user\.npmrc
always-auth = true
registry = "http://server:8080/tfs/DefaultCollection/_packaging/Project-NuGet/np
m/registry"
; builtin config undefined
prefix = "C:\\Users\\user\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Users\user\Source\Repos\project\Node\node_modules\which
; HOME = C:\Users\user
; "npm config ls -l" to show all defaults.
Thanks,
Mamrez
After restarting the developer laptop and tried the steps in the
https://www.visualstudio.com/en-us/docs/package/npm/npmrc
again; It worked!! and I can publish the NPM packages
The below error occurred while in attempt to deploy my app to the mobile phone for testing.
the app function in the Xcode Simulator, and was able to export to the app into iPhone for testing.
after running the npm start the following error occurred.
while the iPhone app did load but count not connect to development server due to not able to npm start.
And yes both the iPhone and my computer is on the same wireless network.
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/jimmylin/dev/ga/WalkingTour/SohoDuck
[10:40:02 AM] <START> Building Dependency Graph
[10:40:02 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
ERROR: Unknown option --no-pretty
ERROR: Unknown option --no-pretty
Watchman: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
ERROR watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
Error: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty
at ChildProcess.<anonymous> (/Users/jimmylin/dev/ga/WalkingTour/SohoDuck/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:477:12)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! SohoDuck#0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SohoDuck#0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the SohoDuck package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs SohoDuck
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls SohoDuck
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jimmylin/dev/ga/WalkingTour/SohoDuck/npm-debug.log
any suggestion would be greatly appreciated.
Correct installation of dependencies
Uninstall watchman and flow via npm and homebrew
Install watchman and flow only via homebrew
brew install watchman
brew install flow