Closed TNSaturday closed 3 weeks ago
Hy,
I tried the steps to mimic what you have done, but it worked for me. (Windows 11, Node 20.10.0, NPM 10.2.3)
Based on the error messages (Error: EBUSY: resource busy or locked
), for me it seems like a windows issue, try installing the package after a windows restart.
^^ Ditto. osx is good for me:
/tmp/app-name$ npm add @carbon/vue
added 26 packages, and audited 55 packages in 46s
10 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
@davidnixon I've also seen this issue today; Ubuntu running WSL2 Also on the demo projhect hello-carbon-vue3
I'm using Node v20. as well.... not yet debugged into this - contact me via whitemat@uk.ibm.com if I can help
same here osx v20.12.0 arm64 3.0.14 is fine if i update to 3.0.15 it breaks
FYI _ I've found that yarn
does do the installation... worth a try.
Windows 11 23H2 Node 22.1.0, npm 10.7.0 - same issues here. Specifically targeting 3.0.14 or older versions seems to give the same errors, as well as WSL.
Windows 11 23H2 Node 22.1.0, npm 10.7.0 - same issues here. Specifically targeting 3.0.14 or older versions seems to give the same errors, as well as WSL.
I'm using WSL2 as well. Had to use Yarn to get it to work
From above output I can see it is trying to run the "_postinstall" script in the package which is
node prepare.js && node .storybook/postinstall.js && ibmtelemetry --config=telemetry.yml
but why? During the packaging tha script specifically gets renamed to from postinstall
to _postinstall so that it will not run. Why is npm running it like its a lifecycle script?
So I think it is some new behaviour with npm 10?
We do have a change in-flight in PR #1593 that changes postinstall to run the ibmtelemetry package but I think that will not fix it for node 20. Try this in node20/npm 10
npm add @carbon/icon-helpers
That package also includes ibmtelemetry and I get this error:
npm ERR! code 126
npm ERR! path /private/tmp/app-name-20/node_modules/@carbon/icon-helpers
npm ERR! command failed
npm ERR! command sh -c ibmtelemetry --config=telemetry.yml
npm ERR! sh: /private/tmp/app-name-20/node_modules/.bin/ibmtelemetry: Permission denied
So more clues but no solution. :-(
Verified on Ubuntu 22.04 LTS, Node v20.13.1, npm 10.5.2, no luck and issue still here.
any news on this? @davidnixon
I fiddled with it a little, npm fails but pnpm and yarn works ok in wsl, node 20, npm 10.
I think the difference is when each package manager resolve postinstall scripts. I cant seem to find a detailed description from how it works, but in the registries they use the original postinstall script, maybe npm read from there and pnpm / yarn read from installed dependencies package.json.
...
"3.0.15": {
"name": "@carbon/vue",
"license": "Apache-2.0",
"version": "3.0.15",
"description": "A collection of components for the Carbon Design System built using Vue.js",
"packageManager": "yarn@3.2.0",
"main": "dist/carbon-vue-3.umd.min.js",
"types": "src/index.d.ts",
"web-types": "dist/web-types.json",
"scripts": {
"postinstall": "node prepare.js && node .storybook/postinstall.js && ibmtelemetry --config=telemetry.yml",
"prepack": "pinst --disable",
"postpack": "pinst --enable",
"build": "vue-cli-service build --target lib --name carbon-vue-3 ./src/index.js --no-clean",
"lint": "vue-cli-service lint",
"build-web-types": "vue-docgen-web-types --outFile dist/web-types.json",
"add-components-exports": "node addNamedComponentExports.js",
"ci-check": "yarn add-components-exports && yarn format:diff && yarn test && yarn build && yarn build-web-types",
"format": "prettier --write '**/*.{scss,css,js,md,vue}' '!**/{build,es,lib,storybook,ts,umd,.coverage}/**'",
"format:diff": "prettier --list-different '**/*.{scss,css,js,md,vue}' '!**/{dist,storybook-static,.coverage}/**'",
"format:staged": "prettier --write '**/*.{scss,css,js,md,vue}' '!**/{dist,storybook-static,.coverage}/**'",
"lint:css": "stylelint '{packages,storybook}/**/*.{vue,scss}'",
"lint:es": "eslint src/**/*.{js,vue}",
"lint:style": "vue-cli-service lint:style",
"serve:storybook": "cd ./storybook && yarn run serve",
"test": "vue-cli-service test:unit --no-coverage"
},
...
I'm also experiencing this on Manjaro currently.
It's definitely npm 20 + vs yarn or pnpm or npm 18- and it definitely related to a difference in how the the lifecycle scripts are executed. The relevant bits are:
json
"postinstall": "node prepare.js && node .storybook/postinstall.js && ibmtelemetry --config=telemetry.yml",
"prepack": "pinst --disable",
"postpack": "pinst --enable",
in the installed version of package.json it looks like this:
node_modules/@carbon/vue/package.json
"_postinstall": "node prepare.js && node .storybook/postinstall.js && ibmtelemetry --config=telemetry.yml",
"prepack": "pinst --disable",
"postpack": "pinst --enable",
notice the "_" in front of "_postinstall" this should keep the postinstall script from running but it is running in npm 20+. My guess is that npm 20+ is also running the "postpack" lifecycle task which then enables "postinstall".
I think the right next step is to move all of the postinstall to a seperate js file and try catch the execution so that errors do not prevent the install.Thoughts?
@KeenanKunzelman @benceszenassy @morpheux @liucgbj @mbwhite @TNSaturday
Could I ask you to try again with the tgz attached to PR #1602 carbon-vue-3.0.15-4a6cf.tgz
Would be great if you added a comment to the PR or here to say if it worked or not.
@davidnixon , please see my result below.
ENV: Ubuntu 22.04 LTS, Node v20.14.0 npm 10.7.0 mem: 20GB
Reproduce Steps
Step1: run following command
# tar -zxvf carbon-vue-3.0.15-4a6cf.tgz
to extract files fromcarbon-vue-3.0.15-4a6cf.tgz
![]()
Step2: run following command to install it.
![]()
![]()
@liucgbj can you try carbon-vue-3.0.15-1c45c.tgz
Also, for your test case, I think the right command is be npm install --omit-dev
.
I have not looked at moving the dev install to node 18+.
@liucgbj I merged a fix for this an its is included in 3.0.16. Please lmk if it works for you. If it does not I will reopen this issue.
@davidnixon using the package you provided it works, but with 3.0.16 i see this.
tryied with node_modules and package.json deleted
@davidnixon , please see below result for 3.0.16
.
ENV: Ubuntu 22.04 LTS, Node v20.14.0 npm 10.7.0 mem: 20GB
@davidnixon , please see below result for carbon-vue-3.0.15-1c45c.tgz
.
ENV: Ubuntu 22.04 LTS, Node v20.14.0 npm 10.7.0 mem: 20GB
[Title]: Cannot install carbon-vue on fresh Vue 3 project
Detailed description
I'm trying to install @carbon/vue 3 on a new Vue 3 project generated using Vite Vue 3 template.
Bug.
No.
I expect
npm add
command to run succesfully. Instead got this error message:Not browser related.
3.0.13
Just trying carbon out.
Steps to reproduce the issue
npm create vite@latest app-name -- --template vue
cd
into directory and runnpm install
npm add @carbon/vue
Additional information