I learned about Sass and Bootstrap, and now want to put it all together in a project using npm, but I’m completely lost.
Here’s what I’ve done so far:
$ npm init
// following the intructions//
$ npm install typescript
$ npm install bootstrap#5.3.0-alpha1
$ npm install sass
I ended up with the following package.json:
{
"dependencies": {
"bootstrap": "^5.3.0-alpha1",
"sass": "^1.57.1",
"typescript": "^4.9.4"
},
"name": "mytmpvpn-frontend",
"version": "1.0.0",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": ""
}
That’s the package-lock.json
{
"name": "mytmpvpn-frontend",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "mytmpvpn-frontend",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"bootstrap": "^5.3.0-alpha1",
"sass": "^1.57.1",
"typescript": "^4.9.4"
},
"devDependencies": {}
},
"node_modules/#popperjs/core": {
"version": "2.11.6",
"resolved": "https://registry.npmjs.org/#popperjs/core/-/core-2.11.6.tgz",
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
"peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"engines": {
"node": ">=8"
}
},
"node_modules/bootstrap": {
"version": "5.3.0-alpha1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.0-alpha1.tgz",
"integrity": "sha512-ABZpKK4ObS3kKlIqH+ZVDqoy5t/bhFG0oHTAzByUdon7YIom0lpCeTqRniDzJmbtcWkNe800VVPBiJgxSYTYew==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"peerDependencies": {
"#popperjs/core": "^2.11.6"
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dependencies": {
"fill-range": "^7.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/immutable": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.2.1.tgz",
"integrity": "sha512-7WYV7Q5BTs0nlQm7tl92rDYYoyELLKHoDMBKhrxEoiV4mrfVdRz8hzPiYOzH7yWjzoVEamxRuAqhxL2PLRwZYQ=="
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/sass": {
"version": "1.57.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.57.1.tgz",
"integrity": "sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
}
},
"dependencies": {
"#popperjs/core": {
"version": "2.11.6",
"resolved": "https://registry.npmjs.org/#popperjs/core/-/core-2.11.6.tgz",
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
"peer": true
},
"anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"requires": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
}
},
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
},
"bootstrap": {
"version": "5.3.0-alpha1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.0-alpha1.tgz",
"integrity": "sha512-ABZpKK4ObS3kKlIqH+ZVDqoy5t/bhFG0oHTAzByUdon7YIom0lpCeTqRniDzJmbtcWkNe800VVPBiJgxSYTYew==",
"requires": {}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"requires": {
"fill-range": "^7.0.1"
}
},
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"requires": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"fsevents": "~2.3.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"requires": {
"to-regex-range": "^5.0.1"
}
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"optional": true
},
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"requires": {
"is-glob": "^4.0.1"
}
},
"immutable": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.2.1.tgz",
"integrity": "sha512-7WYV7Q5BTs0nlQm7tl92rDYYoyELLKHoDMBKhrxEoiV4mrfVdRz8hzPiYOzH7yWjzoVEamxRuAqhxL2PLRwZYQ=="
},
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"requires": {
"binary-extensions": "^2.0.0"
}
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
},
"is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
},
"readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"requires": {
"picomatch": "^2.2.1"
}
},
"sass": {
"version": "1.57.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.57.1.tgz",
"integrity": "sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==",
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
}
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"requires": {
"is-number": "^7.0.0"
}
},
"typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg=="
}
}
}
That’s the structure of my project folder:
$ npm ll
mytmpvpn-frontend#1.0.0
│ /home/user/local/dev/mytmpvpn-global/mytmpvpn-frontend
│
├── bootstrap#5.3.0-alpha1
│
├── sass#1.57.1
│
└── typescript#4.9.4
My questions are the following:
Where do I start editing my custom.scss file for customizing Boostrap?
How can I make sure that Sass is "wathcing" my custom.scss file and compiling in the correct .css file?
More generally, what’s the best practice in terms of architecture for a front-end project like that? Do I create a folder my-edits for example and then do other folders for html, scss, ts, etc.
Related
Good day dear community,
Issue:
We do require install Cypress version 9.5.4
Despite the fact we are following the Cypress documentation its installed version 11.2.0
This is a fresh installation, therefore there isn't a cache of previous versions interfering.
Package.Json shows that the version and its dependencies are version 9.5.4
The sequence of commands we performed is described in the section Steps
Steps
This command installs Node.js:
c: & cd \strains\node & msiexec /i node.msi /qb /l* Node.js-Install.log
Then we proceed to check the npm and node versions installed, to confirm installation went through:
npm -v; node -v
Now we proceed to install cypress now the dependencies were validated:
If(-NOT (Test-Path C:\Cypress)){mkdir C:\Cypress}; cd C:\Cypress npm init npm install cypress#9.5.4 --save-dev
Now to validate if cypress installed and which version:
npx cypress open It looks like this is your first time using Cypress: 11.2.0
Then I did decide to clean all the cypress cache and even so I got this message Deleted all binary caches except for the 11.2.0 binary cache.
To my surprise cypress output version shown above is from version 11.2.0, contradictory to this the package.json shows that the only version present in that file is 9.5.4 as shown in the snippet below.
To make easier the search from below snippet do a Ctrl+F and type "cypress": { "version": "", it would be present only one version of cypress that as mentioned before is 9.5.4 with all its related dependencies (that are a lot)
So, were am i failling? why version 11.2.0 is the one installed? will appreciated all your help
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"#colors/colors": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/#colors/colors/-/colors-1.5.0.tgz",
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
"dev": true,
"optional": true
},
"#cypress/request": {
"version": "2.88.10",
"resolved": "https://registry.npmjs.org/#cypress/request/-/request-2.88.10.tgz",
"integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==",
"dev": true,
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"http-signature": "~1.3.6",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^8.3.2"
}
},
"#cypress/xvfb": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/#cypress/xvfb/-/xvfb-1.2.4.tgz",
"integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==",
"dev": true,
"requires": {
"debug": "^3.1.0",
"lodash.once": "^4.1.1"
},
"dependencies": {
"debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
}
}
},
},
"cypress": {
"version": "9.5.4",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.4.tgz",
"integrity": "sha512-6AyJAD8phe7IMvOL4oBsI9puRNOWxZjl8z1lgixJMcgJ85JJmyKeP6uqNA0dI1z14lmJ7Qklf2MOgP/xdAqJ/Q==",
"dev": true,
"requires": {
"#cypress/request": "^2.88.10",
"#cypress/xvfb": "^1.2.4",
"#types/node": "^14.14.31",
"#types/sinonjs__fake-timers": "8.1.1",
"#types/sizzle": "^2.3.2",
"arch": "^2.2.0",
"blob-util": "^2.0.2",
"bluebird": "^3.7.2",
"buffer": "^5.6.0",
"cachedir": "^2.3.0",
"chalk": "^4.1.0",
"check-more-types": "^2.24.0",
"cli-cursor": "^3.1.0",
"cli-table3": "~0.6.1",
"commander": "^5.1.0",
"common-tags": "^1.8.0",
"dayjs": "^1.10.4",
"debug": "^4.3.2",
"enquirer": "^2.3.6",
"eventemitter2": "^6.4.3",
"execa": "4.1.0",
"executable": "^4.1.1",
"extract-zip": "2.0.1",
"figures": "^3.2.0",
"fs-extra": "^9.1.0",
"getos": "^3.2.1",
"is-ci": "^3.0.0",
"is-installed-globally": "~0.4.0",
"lazy-ass": "^1.6.0",
"listr2": "^3.8.3",
"lodash": "^4.17.21",
"log-symbols": "^4.0.0",
"minimist": "^1.2.6",
"ospath": "^1.2.2",
"pretty-bytes": "^5.6.0",
"proxy-from-env": "1.0.0",
"request-progress": "^3.0.0",
"semver": "^7.3.2",
"supports-color": "^8.1.1",
"tmp": "~0.2.1",
"untildify": "^4.0.0",
"yauzl": "^2.10.0"
}
},
"pretty-bytes": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
"integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==",
"dev": true
},
"proxy-from-env": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
"integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==",
"dev": true
},
"psl": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
"integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==",
"dev": true
},
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
"qs": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
"dev": true
},
"request-progress": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz",
"integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==",
"dev": true,
"requires": {
"throttleit": "^1.0.0"
}
},
"restore-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
}
},
"rfdc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==",
"dev": true
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}
},
"rxjs": {
"version": "7.5.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz",
"integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==",
"dev": true,
"requires": {
"tslib": "^2.1.0"
}
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
},
"semver": {
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
}
},
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"requires": {
"shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
},
"slice-ansi": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
"integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
"is-fullwidth-code-point": "^3.0.0"
}
},
"sshpk": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
"integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
"dev": true,
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
}
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
},
"strip-final-newline": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
"dev": true
},
"supports-color": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"throttleit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
"integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==",
"dev": true
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"dev": true
},
"tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"dev": true,
"requires": {
"rimraf": "^3.0.0"
}
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"dev": true,
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
"dev": true,
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==",
"dev": true
},
"type-fest": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"dev": true
},
"universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"dev": true
},
"untildify": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
"integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
"dev": true
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
"dev": true,
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
}
},
"wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
},
"yauzl": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
"dev": true,
"requires": {
"buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"
}
}
}
}
Summarize
with clone a git repo, npm install to install modules, and then ```npm run''' this demo with error like this
Error occurred compiling file D:/git/www_front/src/pages/Version/index.less
Error LessError: Cannot find module '#/utils/utils.less' from
Describe
with try some times , find this module's antd-pro-theme-webpack-plugin requires antd-theme-generator was update, may i get an answer to resolve this bug.
may i know , how do you control package.joso dependense version, with ^ , # or just hard it?
this is part of package.json and package-lock.josn file
file
index.less
#import '~antd/lib/style/themes/default.less';
#import '~#/utils/utils.less';
package.json:
"devDependencies": {
"#types/react": "^16.4.11",
"#types/react-dom": "^16.0.6",
"antd-pro-merge-less": "^0.0.9",
"antd-pro-theme-webpack-plugin": "^1.1.8",
"babel-eslint": "^9.0.0",
"cross-env": "^5.1.1",
"cross-port-killer": "^1.0.1",
}
package-lock.json with bug
"antd-pro-theme-webpack-plugin": {
"version": "1.1.8",
"resolved": "https://registry.npm.taobao.org/antd-pro-theme-webpack-plugin/download/antd-pro-theme-webpack-plugin-1.1.8.tgz",
"integrity": "sha1-iLyjkioefvIdLVfaqOLBmIYQ+dw=",
"dev": true,
"requires": {
"antd-theme-generator": "^1.1.3",
"less": "^2.7.2",
"less-bundle-promise": "1.0.4",
"postcss": "^6.0.21"
}
},
"antd-theme-generator": {
"version": "1.2.4",
"resolved": "https://registry.npm.taobao.org/antd-theme-generator/download/antd-theme-generator-1.2.4.tgz",
"integrity": "sha1-pro7Mq10TrpJEcJqRM58y8NpVBU=",
"dev": true,
"requires": {
"glob": "^7.1.3",
"hash.js": "^1.1.5",
"less": "^3.9.0",
"less-plugin-npm-import": "^2.1.0",
"postcss": "^6.0.21",
"strip-css-comments": "^4.1.0"
},
"dependencies": {
"less": {
"version": "3.11.3",
"resolved": "https://registry.npm.taobao.org/less/download/less-3.11.3.tgz",
"integrity": "sha1-LYU5VPz+AWmor4aWILyqFlY9zBw=",
"dev": true,
"requires": {
"clone": "^2.1.2",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"promise": "^7.1.1",
"request": "^2.83.0",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
}
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz",
"integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=",
"dev": true,
"optional": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1567937985360&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
"dev": true,
"optional": true
}
}
},
package-lock.json with ok verson:
"antd-pro-theme-webpack-plugin": {
"version": "1.1.8",
"resolved": "https://registry.npm.taobao.org/antd-pro-theme-webpack-plugin/download/antd-pro-theme-webpack-plugin-1.1.8.tgz",
"integrity": "sha1-iLyjkioefvIdLVfaqOLBmIYQ+dw=",
"dev": true,
"requires": {
"antd-theme-generator": "^1.1.3",
"less": "^2.7.2",
"less-bundle-promise": "1.0.4",
"postcss": "^6.0.21"
}
},
"antd-theme-generator": {
"version": "1.1.9",
"resolved": "https://registry.npm.taobao.org/antd-theme-generator/download/antd-theme-generator-1.1.9.tgz",
"integrity": "sha1-dfc6VvAi2o9zMWrZ0dCKwvYoFng=",
"dev": true,
"requires": {
"glob": "^7.1.3",
"hash.js": "^1.1.5",
"less": "^3.9.0",
"less-bundle-promise": "1.0.7",
"less-plugin-npm-import": "^2.1.0",
"postcss": "^6.0.21",
"postcss-colors-only": "0.0.3"
},
"dependencies": {
"less": {
"version": "3.11.1",
"resolved": "https://registry.npm.taobao.org/less/download/less-3.11.1.tgz?cache=0&sync_timestamp=1581428110523&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless%2Fdownload%2Fless-3.11.1.tgz",
"integrity": "sha1-xr8I454CQE/mswej3/+v3FW9NuI=",
"dev": true,
"requires": {
"clone": "^2.1.2",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"mime": "^1.4.1",
"mkdirp": "^0.5.0",
"promise": "^7.1.1",
"request": "^2.83.0",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
}
},
"less-bundle-promise": {
"version": "1.0.7",
"resolved": "https://registry.npm.taobao.org/less-bundle-promise/download/less-bundle-promise-1.0.7.tgz",
"integrity": "sha1-GY15kaxPXzx4YvrBB0x7msp7nLI=",
"dev": true
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz",
"integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=",
"dev": true,
"optional": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
"dev": true,
"optional": true
}
}
},
I think you have usenpm install outside of the project. Make sure you are on the inside of your project, then use npm install it should work.
I'm using an older version of node (6.17.1) and had explicitly installed eslint#5.16.0 as the newer versions of eslint don't work with node 6. This had been working without any problems for a while.
Recently, when installing eslint#5.16.0 from package.json using npm install no longer works -- there is now an incompatible dependency that I assume is somewhere in eslint's dependency tree.
My question is, was npm install on a specific version of eslint expected to continue working forever in the same way? Or is this normal for npm packages (of a specific version) to have some package deep in the dependency tree change, and then break that specific version of the first package?
And if this cannot be prevented, is there any way to easily fix this once a dependency breaks? Is this what package-lock.json is for?
The error output from npm is below:
npm ERR! Darwin 18.5.0
npm ERR! argv "/Users/~/.nvm/versions/node/v6.17.1/bin/node" "/Users/~/.nvm/versions/node/v6.17.1/bin/npm" "install" "eslint#5.16.0"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for esquery#1.2.0: wanted: {"node":">=8.0"} (current: {"node":"6.17.1","npm":"3.10.10"})
npm ERR! notsup Not compatible with your version of node/npm: esquery#1.2.0
npm ERR! notsup Not compatible with your version of node/npm: esquery#1.2.0
npm ERR! notsup Required: {"node":">=8.0"}
npm ERR! notsup Actual: {"npm":"3.10.10","node":"6.17.1"}
Thanks in advance!
As you aluded to, this is what the lock file (package-lock.json for npm and yarn.lock for yarn) is for. Otherwise, npm will look for the latest package version that satisfy the constraints, for both the package you specified as well as its dependencies, and their dependencies, and so on.
However, package-lock.json was only introduced in npm v5, and so your current version of npm (v3.10.10) won't have a package-lock.json. You'd instead need to use npm shrinkwrap. I'd advice you to use yarn in the future if you are not able to update your version of Node.js.
From your error output, it seems like esquery requires an engine version of Node.js v8 or above. By using a newer version of Node.js, and running yarn why esquery to see why it's required, it seems like it's depended on directly by eslint.
$ yarn why esquery
yarn why v1.22.4
[1/4] Why do we have the module "esquery"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "esquery#1.2.0"
info Reasons this module exists
- "eslint" depends on it
- Hoisted from "eslint#esquery"
info Disk size without dependencies: "744KB"
info Disk size with unique dependencies: "796KB"
info Disk size with transitive dependencies: "796KB"
info Number of shared dependencies: 1
Done in 0.12s.
ESLint v5.16.0 specifies a dependency on esquery using the caret range ^1.0.1 which means it will use the latest version of esquery provided the major version is still 1. This was fine until esquery v1.1.0, since it supported Node.js v0.6 and above; but in v1.2.0, this was changed to v8 and above.
Since this is, evidently, a breaking change, if the authors were abiding by Semantic Versioning 2.0.0, they should have bumped the version number to v2.0.0 instead of v1.2.0, but nowhere in the README.md does it says it's following semver.
The proper fix would be to create a PR on the eslint repository proposing to change the version range from ^1.0.1 to 1.1.x (or ~1.1), but for now, you can try using this npm-shrinkwrap.json, which specifies the 1.1.0 version of esquery.
{
"name": "sonpminstall",
"version": "1.0.0",
"dependencies": {
"#babel/code-frame": {
"version": "7.8.3",
"from": "#babel/code-frame#>=7.0.0 <8.0.0",
"resolved": "https://registry.npmjs.org/#babel/code-frame/-/code-frame-7.8.3.tgz"
},
"#babel/helper-validator-identifier": {
"version": "7.9.0",
"from": "#babel/helper-validator-identifier#>=7.9.0 <8.0.0",
"resolved": "https://registry.npmjs.org/#babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz"
},
"#babel/highlight": {
"version": "7.9.0",
"from": "#babel/highlight#>=7.8.3 <8.0.0",
"resolved": "https://registry.npmjs.org/#babel/highlight/-/highlight-7.9.0.tgz"
},
"acorn": {
"version": "6.4.1",
"from": "acorn#>=6.0.7 <7.0.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz"
},
"acorn-jsx": {
"version": "5.2.0",
"from": "acorn-jsx#>=5.0.0 <6.0.0",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz"
},
"ajv": {
"version": "6.12.0",
"from": "ajv#>=6.9.1 <7.0.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz"
},
"ansi-escapes": {
"version": "3.2.0",
"from": "ansi-escapes#>=3.2.0 <4.0.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz"
},
"ansi-regex": {
"version": "3.0.0",
"from": "ansi-regex#>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz"
},
"ansi-styles": {
"version": "3.2.1",
"from": "ansi-styles#>=3.2.1 <4.0.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz"
},
"argparse": {
"version": "1.0.10",
"from": "argparse#>=1.0.7 <2.0.0",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
},
"astral-regex": {
"version": "1.0.0",
"from": "astral-regex#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz"
},
"balanced-match": {
"version": "1.0.0",
"from": "balanced-match#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
},
"brace-expansion": {
"version": "1.1.11",
"from": "brace-expansion#>=1.1.7 <2.0.0",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz"
},
"callsites": {
"version": "3.1.0",
"from": "callsites#>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz"
},
"chalk": {
"version": "2.4.2",
"from": "chalk#>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz"
},
"chardet": {
"version": "0.7.0",
"from": "chardet#>=0.7.0 <0.8.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz"
},
"cli-cursor": {
"version": "2.1.0",
"from": "cli-cursor#>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz"
},
"cli-width": {
"version": "2.2.0",
"from": "cli-width#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz"
},
"color-convert": {
"version": "1.9.3",
"from": "color-convert#>=1.9.0 <2.0.0",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz"
},
"color-name": {
"version": "1.1.3",
"from": "color-name#1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
},
"concat-map": {
"version": "0.0.1",
"from": "concat-map#0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
},
"cross-spawn": {
"version": "6.0.5",
"from": "cross-spawn#>=6.0.5 <7.0.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz"
},
"debug": {
"version": "4.1.1",
"from": "debug#>=4.0.1 <5.0.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz"
},
"deep-is": {
"version": "0.1.3",
"from": "deep-is#>=0.1.3 <0.2.0",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz"
},
"doctrine": {
"version": "3.0.0",
"from": "doctrine#>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz"
},
"emoji-regex": {
"version": "7.0.3",
"from": "emoji-regex#>=7.0.1 <8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz"
},
"escape-string-regexp": {
"version": "1.0.5",
"from": "escape-string-regexp#>=1.0.5 <2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz"
},
"eslint": {
"version": "5.16.0",
"from": "eslint#>=5.16.0 <6.0.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz"
},
"eslint-scope": {
"version": "4.0.3",
"from": "eslint-scope#>=4.0.3 <5.0.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz"
},
"eslint-utils": {
"version": "1.4.3",
"from": "eslint-utils#>=1.3.1 <2.0.0",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz"
},
"eslint-visitor-keys": {
"version": "1.1.0",
"from": "eslint-visitor-keys#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz"
},
"espree": {
"version": "5.0.1",
"from": "espree#>=5.0.1 <6.0.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz"
},
"esprima": {
"version": "4.0.1",
"from": "esprima#>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz"
},
"esquery": {
"version": "1.1.0",
"from": "esquery#>=1.0.1 <1.2.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz",
"dependencies": {
"estraverse": {
"version": "4.0.0",
"from": "estraverse#>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.0.0.tgz"
}
}
},
"esrecurse": {
"version": "4.2.1",
"from": "esrecurse#>=4.1.0 <5.0.0",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz"
},
"estraverse": {
"version": "4.3.0",
"from": "estraverse#>=4.1.1 <5.0.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz"
},
"esutils": {
"version": "2.0.3",
"from": "esutils#>=2.0.2 <3.0.0",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz"
},
"external-editor": {
"version": "3.1.0",
"from": "external-editor#>=3.0.3 <4.0.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz"
},
"fast-deep-equal": {
"version": "3.1.1",
"from": "fast-deep-equal#>=3.1.1 <4.0.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz"
},
"fast-json-stable-stringify": {
"version": "2.1.0",
"from": "fast-json-stable-stringify#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"
},
"fast-levenshtein": {
"version": "2.0.6",
"from": "fast-levenshtein#>=2.0.6 <2.1.0",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz"
},
"figures": {
"version": "2.0.0",
"from": "figures#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz"
},
"file-entry-cache": {
"version": "5.0.1",
"from": "file-entry-cache#>=5.0.1 <6.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz"
},
"flat-cache": {
"version": "2.0.1",
"from": "flat-cache#>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz"
},
"flatted": {
"version": "2.0.1",
"from": "flatted#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz"
},
"fs.realpath": {
"version": "1.0.0",
"from": "fs.realpath#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
},
"functional-red-black-tree": {
"version": "1.0.1",
"from": "functional-red-black-tree#>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz"
},
"glob": {
"version": "7.1.6",
"from": "glob#>=7.1.2 <8.0.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz"
},
"globals": {
"version": "11.12.0",
"from": "globals#>=11.7.0 <12.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz"
},
"has-flag": {
"version": "3.0.0",
"from": "has-flag#>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz"
},
"iconv-lite": {
"version": "0.4.24",
"from": "iconv-lite#>=0.4.24 <0.5.0",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz"
},
"ignore": {
"version": "4.0.6",
"from": "ignore#>=4.0.6 <5.0.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz"
},
"import-fresh": {
"version": "3.2.1",
"from": "import-fresh#>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz"
},
"imurmurhash": {
"version": "0.1.4",
"from": "imurmurhash#>=0.1.4 <0.2.0",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz"
},
"inflight": {
"version": "1.0.6",
"from": "inflight#>=1.0.4 <2.0.0",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz"
},
"inherits": {
"version": "2.0.4",
"from": "inherits#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
},
"inquirer": {
"version": "6.5.2",
"from": "inquirer#>=6.2.2 <7.0.0",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz",
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"from": "ansi-regex#>=4.1.0 <5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz"
},
"strip-ansi": {
"version": "5.2.0",
"from": "strip-ansi#>=5.1.0 <6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz"
}
}
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"from": "is-fullwidth-code-point#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz"
},
"is-promise": {
"version": "2.1.0",
"from": "is-promise#>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz"
},
"isexe": {
"version": "2.0.0",
"from": "isexe#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz"
},
"js-tokens": {
"version": "4.0.0",
"from": "js-tokens#>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
},
"js-yaml": {
"version": "3.13.1",
"from": "js-yaml#>=3.13.0 <4.0.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz"
},
"json-schema-traverse": {
"version": "0.4.1",
"from": "json-schema-traverse#>=0.4.1 <0.5.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz"
},
"json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"from": "json-stable-stringify-without-jsonify#>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz"
},
"levn": {
"version": "0.3.0",
"from": "levn#>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz"
},
"lodash": {
"version": "4.17.15",
"from": "lodash#>=4.17.11 <5.0.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz"
},
"mimic-fn": {
"version": "1.2.0",
"from": "mimic-fn#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz"
},
"minimatch": {
"version": "3.0.4",
"from": "minimatch#>=3.0.4 <4.0.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz"
},
"minimist": {
"version": "1.2.5",
"from": "minimist#>=1.2.5 <2.0.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
},
"mkdirp": {
"version": "0.5.4",
"from": "mkdirp#>=0.5.1 <0.6.0",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz"
},
"ms": {
"version": "2.1.2",
"from": "ms#>=2.1.1 <3.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
},
"mute-stream": {
"version": "0.0.7",
"from": "mute-stream#0.0.7",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz"
},
"natural-compare": {
"version": "1.4.0",
"from": "natural-compare#>=1.4.0 <2.0.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz"
},
"nice-try": {
"version": "1.0.5",
"from": "nice-try#>=1.0.4 <2.0.0",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz"
},
"once": {
"version": "1.4.0",
"from": "once#>=1.3.0 <2.0.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
},
"onetime": {
"version": "2.0.1",
"from": "onetime#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz"
},
"optionator": {
"version": "0.8.3",
"from": "optionator#>=0.8.2 <0.9.0",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz"
},
"os-tmpdir": {
"version": "1.0.2",
"from": "os-tmpdir#>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz"
},
"parent-module": {
"version": "1.0.1",
"from": "parent-module#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz"
},
"path-is-absolute": {
"version": "1.0.1",
"from": "path-is-absolute#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
},
"path-is-inside": {
"version": "1.0.2",
"from": "path-is-inside#>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz"
},
"path-key": {
"version": "2.0.1",
"from": "path-key#>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz"
},
"prelude-ls": {
"version": "1.1.2",
"from": "prelude-ls#>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz"
},
"progress": {
"version": "2.0.3",
"from": "progress#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz"
},
"punycode": {
"version": "2.1.1",
"from": "punycode#>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz"
},
"regexpp": {
"version": "2.0.1",
"from": "regexpp#>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz"
},
"resolve-from": {
"version": "4.0.0",
"from": "resolve-from#>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz"
},
"restore-cursor": {
"version": "2.0.0",
"from": "restore-cursor#>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz"
},
"rimraf": {
"version": "2.6.3",
"from": "rimraf#2.6.3",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz"
},
"run-async": {
"version": "2.4.0",
"from": "run-async#>=2.2.0 <3.0.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz"
},
"rxjs": {
"version": "6.5.4",
"from": "rxjs#>=6.4.0 <7.0.0",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz"
},
"safer-buffer": {
"version": "2.1.2",
"from": "safer-buffer#>=2.1.2 <3.0.0",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
},
"semver": {
"version": "5.7.1",
"from": "semver#>=5.5.1 <6.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
},
"shebang-command": {
"version": "1.2.0",
"from": "shebang-command#>=1.2.0 <2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz"
},
"shebang-regex": {
"version": "1.0.0",
"from": "shebang-regex#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz"
},
"signal-exit": {
"version": "3.0.2",
"from": "signal-exit#>=3.0.2 <4.0.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz"
},
"slice-ansi": {
"version": "2.1.0",
"from": "slice-ansi#>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz"
},
"sprintf-js": {
"version": "1.0.3",
"from": "sprintf-js#>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
},
"string-width": {
"version": "2.1.1",
"from": "string-width#>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz"
},
"strip-ansi": {
"version": "4.0.0",
"from": "strip-ansi#>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz"
},
"strip-json-comments": {
"version": "2.0.1",
"from": "strip-json-comments#>=2.0.1 <3.0.0",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz"
},
"supports-color": {
"version": "5.5.0",
"from": "supports-color#>=5.3.0 <6.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
},
"table": {
"version": "5.4.6",
"from": "table#>=5.2.3 <6.0.0",
"resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"from": "ansi-regex#>=4.1.0 <5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz"
},
"string-width": {
"version": "3.1.0",
"from": "string-width#>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz"
},
"strip-ansi": {
"version": "5.2.0",
"from": "strip-ansi#>=5.1.0 <6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz"
}
}
},
"text-table": {
"version": "0.2.0",
"from": "text-table#>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
},
"through": {
"version": "2.3.8",
"from": "through#>=2.3.6 <3.0.0",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz"
},
"tmp": {
"version": "0.0.33",
"from": "tmp#>=0.0.33 <0.0.34",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz"
},
"tslib": {
"version": "1.11.1",
"from": "tslib#>=1.9.0 <2.0.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz"
},
"type-check": {
"version": "0.3.2",
"from": "type-check#>=0.3.2 <0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz"
},
"uri-js": {
"version": "4.2.2",
"from": "uri-js#>=4.2.2 <5.0.0",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz"
},
"which": {
"version": "1.3.1",
"from": "which#>=1.2.9 <2.0.0",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz"
},
"word-wrap": {
"version": "1.2.3",
"from": "word-wrap#>=1.2.3 <1.3.0",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz"
},
"wrappy": {
"version": "1.0.2",
"from": "wrappy#>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
},
"write": {
"version": "1.0.3",
"from": "write#1.0.3",
"resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz"
}
}
}
$ node -v
v6.17.1
$ npm -v
3.10.10
$ ls
npm-shrinkwrap.json package.json
$ npm install
...
I am building a web app from a sample I found, and get a warning in my output "DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead."
In the package-lock.json file it refers to safer-buffer, which from my research is what is used to upgrade the buffer, however I am assuming this may be causing the issue. Here are the parts of the file which refer to buffer:
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
"bl": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz",
"integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==",
"requires": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
}
"buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"express": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
"integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
"requires": {
"accepts": "~1.3.5",
"array-flatten": "1.1.1",
"body-parser": "1.18.3",
"content-disposition": "0.5.2",
"content-type": "~1.0.4",
"cookie": "0.3.1",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.1.1",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.2",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.4",
"qs": "6.5.2",
"range-parser": "~1.2.0",
"safe-buffer": "5.1.2",
"send": "0.16.2",
"serve-static": "1.13.2",
"setprototypeof": "1.1.0",
"statuses": "~1.4.0",
"type-is": "~1.6.16",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
}
"iconv-lite": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"requires": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"requires": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"mysql": {
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.16.0.tgz",
"integrity": "sha512-dPbN2LHonQp7D5ja5DJXNbCLe/HRdu+f3v61aguzNRQIrmZLOeRoymBYyeThrR6ug+FqzDL95Gc9maqZUJS+Gw==",
"requires": {
"bignumber.js": "4.1.0",
"readable-stream": "2.3.6",
"safe-buffer": "5.1.2",
"sqlstring": "2.3.1"
}
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"request": {
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
Anyone know what I need to do to "upgrade" these references so I am not getting the depreciation warning?
Just like the warning said
DeprecationWarning: Buffer() is deprecated due to security and
usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(),
or Buffer.from() methods instead.
To avoid the depreciation warning. You need to find out the new Buffer() methods in your codes and replace them with a new one. Such as in the extend-node.js file(NodeTaskApp-master\node_modules\iconv-lite\lib), Line 13:
iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array);
With the following package.json
{
"name": "...",
"version": "0.1.1",
"engines": {
"node": "0.6.14",
"npm": "1.1.4"
},
"private": true,
"scripts": {
"start": "node app"
},
"dependencies": {
"connect-assets": "2.1.9",
"ejs": "0.7.1",
"everyauth": "0.2.32",
"express": "2.5.9",
"less-middleware": "0.1.4",
"mocha": "1.0.1",
"should": "0.6.1",
"socket.io": "0.9.6",
"underscore": "1.3.3"
}
}
I get the following
WARNING: No version of Node.js specified in package.json, see:
https://devcenter.heroku.com/articles/nodejs-versions
Try changing node version to something like this
{
"engines": {
"node": "0.6.x",
"npm": "1.0.x"
}
}
This will try to attach "major" version should still work fine.