I want to upgrade expo to the latest version - SDK 47 from SDK 44 that I am currently using.
My npm version is 8.19.2, node version is 16.18.2 if it helps.
When I tried running the command: expo-cli upgrade, I am getting the following error:
✖ Failed to install expo package with error: npm exited with non-zero code: 1
npm exited with non-zero code: 1
Error: npm exited with non-zero code: 1
at ChildProcess.completionListener (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/node_modules/#expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
...
at spawnAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/node_modules/#expo/spawn-async/src/spawnAsync.ts:26:19)
at NpmPackageManager._runAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/node_modules/#expo/package-manager/src/NodePackageManagers.ts:166:31)
at NpmPackageManager.installAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/node_modules/#expo/package-manager/src/NodePackageManagers.ts:82:16)
at NpmPackageManager.addWithParametersAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/node_modules/#expo/package-manager/src/NodePackageManagers.ts:96:18)
at NpmPackageManager.addAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/node_modules/#expo/package-manager/src/NodePackageManagers.ts:109:5)
at upgradeAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:496:7)
at actionAsync (/Users/abcd/.nvm/versions/node/v16.18.0/lib/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:42:3)
After reading a bit on the internet, I tried deleting the "package.lock.json" file but I have no idea why it would have worked as it didn't.
I also checked "babel-preset-expo", which is set to 9.0.2 as it should be as per another article.
It will be great if anyone here could help me with this issue. Thanks!
I had the same issue with node v16.4.0 while upgrading from SDK 44. Changing to v14.17.6 or v19.1.0 made the "expo upgrade" command work properly. These are examples, I am sure it works with other versions, just test by yourself.
You can find node versions on this link : https://nodejs.org/dist/index.json
If you do not want to change your node version for some reason, I do not have a solution for it then. I am currently in this case and searching for a solution ...
Related
this is the first time I post here so apologies if I don't follow some rules or incorrect formatting.
I'm making an app using React Native and Expo and when I try to install bugsnag I get this error.
$ npx bugsnag-expo-cli init
√ #bugsnag/expo does not appear to be installed, do you want to install it? ... yes
√ If you want the latest version of #bugsnag/expo hit enter, otherwise type the version you want ... latest
√ Using yarn or npm? » npm
> Installing #bugsnag/expo with npm. This could take a while!
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Are you attempting to run the bugsnag-expo-cli on Windows? The Expo CLI currently only supports MacOS and Linux:
https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration
As an alternative to the CLI, you can follow the manual integration guide:
https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/
I've got a bit of a weird situation where "ember s" reports "Missing yarn packages" followed by a list of missing packages (two of them) and then "Run 'yarn' to install missing dependencies".
However when I run 'yarn' I get the message "success Already up-to-date" .
Any ideas how to get out of this circle ?
There's something I did immediately before this started which I guess is the source of my problem
Getting rid of an Add-on
I had installed an Ember Add-on which had generated problems so I decided to get rid of it . To do that I did the following :
git push -f origin 913c2dee12b0363df0664c9c63e0443abe0adb57:foo-bar
git reset --hard 913c2dee12b0363df0664c9c63e0443abe0adb57
yarn
yarn install
yarn clean
yarn install
yarn
Where 913c2dee12b0363df0664c9c63e0443abe0adb57 was the last commit before the unwanted add-on was installed. I don't think there was anything wrong in doing that but now I'm wondering.
Output of running Ember Server
When I run 'ember s' I get this output ...
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: foobar -> ember-cli-build-date -> ember-cli-babel
Missing yarn packages:
Package: #bower_components/jquery
* Specified: jquery/jquery-dist#
* Installed: (not installed)
Package: #bower_components/jstree
* Specified: vakata/jstree#^3.3.5
* Installed: (not installed)
Run `yarn` to install missing dependencies.
Stack Trace and Error Report: /tmp/error.dump.33c6e8c0abc9fc8abd355dc080268f9c.log
An error occurred in the constructor for ember-cli-dependency-checker at /media/mint/dev/foobar/node_modules/ember-cli-dependency-checker
Warning about ember-cli versions
I don't think this is relevant but just for completeness
Running the 'yarn' results in the following appearing in the output text ...
warning foobar#0.0.0: "dependencies" has dependency "ember-cli" with range "~3.8.1" that collides with a dependency in "devDependencies" of the same name with version "3.8"
EDIT: OK I was able to resolve this with the help of the comment by dwenzel ...
rm -rf node_modules && yarn
Although that actually led into a different issue which I'm almost certain was unrelated but I'll just mention it here in case it's useful to those who come after.
The execution of yarn initially failed with the following error ...
35238 verbose stack Error: node-sass#4.5.3 postinstall: `node scripts/build.js`
35238 verbose stack Exit status 1
35238 verbose stack at EventEmitter.<anonymous> (/home/rshea/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
35238 verbose stack at EventEmitter.emit (events.js:189:13)
35238 verbose stack at ChildProcess.<anonymous> (/home/rshea/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
35238 verbose stack at ChildProcess.emit (events.js:189:13)
35238 verbose stack at maybeClose (internal/child_process.js:970:16)
35238 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
35239 verbose pkgid node-sass#4.5.3
35240 verbose cwd /media/mintextra/dev/ddn-build-test-temp/foobar
35241 verbose Linux 3.13.0-169-generic
35242 verbose argv "/home/rshea/.nvm/versions/node/v10.15.3/bin/node" "/home/rshea/.nvm/versions/node/v10.15.3/bin/npm" "install"
35243 verbose node v10.15.3
35244 verbose npm v6.4.1
35245 error code ELIFECYCLE
35246 error errno 1
35247 error node-sass#4.5.3 postinstall: `node scripts/build.js`
35247 error Exit status 1
35248 error Failed at the node-sass#4.5.3 postinstall script.
35248 error This is probably not a problem with npm. There is likely additional logging output above.
35249 verbose exit [ 1, true ]
I was able to resolve that with ...
npm install node-sass#latest
npm install
... at which point ember s was able to run without errors.
It looks like you want to do yarn install --check-files to verify that the files have not been removed from node_modules. This avoids having to wipe out your node_modules file which can be time consuming.
https://classic.yarnpkg.com/en/docs/cli/install/#toc-yarn-install-check-files
https://github.com/yarnpkg/yarn/issues/2240
When yarn gets confused like this, you can usually fix things up by clearing out your node modules before installing:
rm -rf node_modules && yarn
The way I managed to get around this without deleting the entire node_modules directory was just to remove the module from topLevelPatterns within node_modules/.yarn-integrity.
Disclaimer: I don't know what the implications of this are but yarn's integrity was already questionable and it works so meh!?
You may also try to reinstall/download all packages with:
yarn install --force
I am trying to access the template from this repository: https://github.com/zurb/foundation-sites-template
I successfully cloned the repository, but apparently, in order to get the actual sass, I need to install npm dependencies. So I ran npm install, only to get this error:
events.js:160░░░░░░⸩ ⠼ extract:interpret: sill extract interpret#1.0.4
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (_stream_writable.js:193:12)
at PassThrough.Writable.write (_stream_writable.js:240:5)
at PassThrough.Writable.end (_stream_writable.js:477:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at emitOne (events.js:101:20)
at ReadEntry.emit (events.js:188:7)
at ReadEntry.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at ReadEntry.[maybeEmitEnd] (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
at ReadEntry.end (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
at Unpack.[consumeBody] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
at Unpack.[consumeChunkSub] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
at Unpack.[consumeChunk] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
at Unzip.(anonymous function).on.chunk (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
at emitOne (events.js:96:13)
at Unzip.emit (events.js:188:7)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
I am using npm version 6.0.0 and node v6.11.2. Running on a mac.
After this I tried installing the foundation cli with npm install foundation-cli --global, but got the exact same error. As far as I know, I meet all the requirements as listed on the github repository, not sure what could be the problem.
Well, turns out it was either my npm or node version. I updated both to the most recent (npm 6.4.1, node v10.8.0) versions, and npm install ran fine. I suppose what can be learned here is that when dealing with zurb foundation, just try to use the latest software.
Summary:
I am looking for a strategy on how I might find and fix an error in package-lock.json. This error breaks npm install:
How do I figure out what installed this buble dependency?
Can I simply delete the entry?
How do I figure out what the reference value should be?
Details
I wanted to update my node_modules. So I deleted my node_modules directory, and ran npm install. While this has always worked in the past, it is now failing with the following error (found in the AppData\Roaming\npm-cache_logs\XXXX-debug.log):
13 silly fetchPackageMetaData error for buble#github:pemrouz/buble#fdcd2bac2c8945816b6fe3b032e49b58cc728b14 Command failed: C:\Program Files\Git\mingw64\bin\git.EXE checkout fdcd2bac2c8945816b6fe3b032e49b58cc728b14
13 silly fetchPackageMetaData fatal: reference is not a tree: fdcd2bac2c8945816b6fe3b032e49b58cc728b14
14 verbose stack Error: Command failed: C:\Program Files\Git\mingw64\bin\git.EXE checkout fdcd2bac2c8945816b6fe3b032e49b58cc728b14
14 verbose stack fatal: reference is not a tree: fdcd2bac2c8945816b6fe3b032e49b58cc728b14
14 verbose stack
14 verbose stack at ChildProcess.exithandler (child_process.js:271:12)
14 verbose stack at emitTwo (events.js:125:13)
14 verbose stack at ChildProcess.emit (events.js:213:7)
14 verbose stack at maybeClose (internal/child_process.js:927:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
I believe the reference is from /package-lock.json where I find 2 entries using this reference. Searching the Net has taught me that /package-lock.json is updated by npm. I do not know how this bubble package got added to my project - must be a dependency of some other package, but I lack the skills to figure out which. The entries look like the following:
...
"buble": {
"version": "github:pemrouz/buble#fdcd2bac2c8945816b6fe3b032e49b58cc728b14",
"requires": {
"acorn": "5.2.1",
...
Searching the Net for similar issues seem to be from users who are trying to sync up their repositories. Those solutions suggest ways to sync forks in Gitub which does not apply to my case. Near as I can tell, someone has updated the Github repository in some way which breaks this reference.
So, I am looking for a strategy on how I might fix this. How do I figure out what installed this buble dependency? Can I simply delete the entry? How do I figure out what the reference value should be?
Thanks in advance for any direction
I got this working. What I did was delete all references to buble in my package-lock.json file (after having made a back-up copy of course). I then deleted my node_modules directory, did npm cache clear --force, then npm install. npm was able to reload everything, and seems to have re-added the buble package to my package-lock.json now with a new reference value.
I do not know if all these steps were necessary; in the end I was getting desperate and ready to try everything. Hope this helps someone else!
I believe you can run npm install --no-optional buble which should prevent optional dependencies from being installed. Before you do this you should delete the old node_modules and start fresh.
https://docs.npmjs.com/cli/install
My problem was that I did not GIT github installed on my machine. You need to install Git, so the npm install can use it to download packages
I have similar problem but not quite same. I had this issue when I try to npm install inside my company network environment. Some certain SSH and HTTPS is blocked. The error message is
npm sill pacote Retrying git command: ls-remote -h -t https://github.com/pemrouz/buble.git attempt # 6
npm sill pacote Retrying git command: ls-remote -h -t https://github.com/pemrouz/buble.git attempt # 7
I removed package-lock.json and do npm install again. Everything was fine.
delete package-lock.json and do npm install again
When I try to upgrade version of jhipster in my application I get following error:
lothrimond#lothrimond-K53SD:~/workspace/NScanner$ npm list generator-jhipster
n-scanner#0.0.0 /home/lothrimond/workspace/NScanner
└── generator-jhipster#3.6.1
lothrimond#lothrimond-K53SD:~/workspace/NScanner$ yo jhipster:upgrade
Welcome to the JHipster Upgrade Sub-Generator
This will upgrade your current application codebase to the latest JHipster version
Looking for latest generator-jhipster version...
/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:279
throw new TypeError('Invalid Version: ' + version);
^
TypeError: Invalid Version: undefined
at new SemVer (/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:279:11)
at compare (/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:566:10)
at Function.lt (/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:600:10)
at null.<anonymous> (/home/lothrimond/workspace/NScanner/node_modules/generator-jhipster/generators/upgrade/index.js:93:28)
at /home/lothrimond/workspace/NScanner/node_modules/shelljs/src/exec.js:172:7
at ChildProcess.exithandler (child_process.js:194:7)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
What am I doing wrong? Please write down in comment if any useful information is missing in my question.
yo:jhipster:upgrade is working only for 3.4.0+
Source: jhipster support chat
I did a "npm update -g generator-hipster" which worked. I too was on 3.6.1 prior to the upgrade when the error that you mentioned occurred.
https://jhipster.github.io/2016/09/16/jhipster-release-3.7.1.html refers to this step as manual upgrade.