Problem installing a package.json

Hello,

I have this package.json file:

{
 "author": "Frappe Technologies Pvt. Ltd.",
 "bugs": {
  "url": "https://github.com/frappe/frappe/issues"
 },
 "dependencies": {
  "awesomplete": "^1.1.2",
  "cookie": "^0.3.1",
  "express": "^4.16.2",
  "frappe-datatable": "^1.8.0",
  "frappe-gantt": "^0.1.0",
  "fuse.js": "^3.2.0",
  "highlight.js": "^9.12.0",
  "jsbarcode": "^3.9.0",
  "moment": "^2.20.1",
  "moment-timezone": "^0.5.21",
  "quill": "2.0.0-dev.2",
  "redis": "^2.8.0",
  "showdown": "^1.8.6",
  "socket.io": "^2.0.4",
  "superagent": "^3.8.2",
  "touch": "^3.1.0",
  "vue": "^2.5.17"
 },
 "devDependencies": {
  "babel-runtime": "^6.26.0",
  "chalk": "^2.3.2",
  "less": "^3.0.4",
  "node-sass": "^4.9.0",
  "rollup": "^0.65.0",
  "rollup-plugin-buble": "^0.19.2",
  "rollup-plugin-commonjs": "^8.3.0",
  "rollup-plugin-multi-entry": "^2.0.2",
  "rollup-plugin-node-resolve": "^3.0.2",
  "rollup-plugin-postcss": "^1.4.0",
  "rollup-plugin-uglify": "^3.0.0",
  "rollup-plugin-vue": "^4.3.2",
  "vue-template-compiler": "^2.5.17"
 },
 "homepage": "https://frappe.io",
 "license": "MIT",
 "name": "frappe",
 "repository": {
  "type": "git",
  "url": "git+https://github.com/frappe/frappe.git"
 },
 "scripts": {
  "build": "node rollup/build.js",
"production": "FRAPPE_ENV=production node rollup/build.js",
  "watch": "node rollup/watch.js"
 }
}

Then, I want to install all of that by using “npm install” command.

After that, this is the whole result:

frappe@vps [~/frappe-bench]# npm install
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > uws@9.14.0 install /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/uws
npm ERR! prepareGitDep > node-gyp rebuild > build_log.txt 2>&1 || exit 0
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > wd@1.11.1 install /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/wd
npm ERR! prepareGitDep > node scripts/build-browser-scripts
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > sauce-connect-launcher@1.2.4 postinstall /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/sauce-connect-launcher
npm ERR! prepareGitDep > node scripts/install.js || nodejs scripts/install.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev prepare /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4
npm ERR! prepareGitDep > npm run build
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev build /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4
npm ERR! prepareGitDep > webpack --config webpack.conf.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm ERR! prepareGitDep npm WARN deprecated   npm i nyc
npm ERR! prepareGitDep npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm ERR! prepareGitDep npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! prepareGitDep npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm ERR! prepareGitDep npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! prepareGitDep npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm ERR! prepareGitDep npm WARN deprecated uws@9.14.0: New code is available at github.com/uNetworking/uWebSockets.js
npm ERR! prepareGitDep npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm ERR! prepareGitDep npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! prepareGitDep npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! prepareGitDep npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm ERR! prepareGitDep npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/config-yargs.js:89
npm ERR! prepareGitDep                          describe: optionsSchema.definitions.output.properties.path.description,
npm ERR! prepareGitDep                                                                     ^
npm ERR! prepareGitDep
npm ERR! prepareGitDep TypeError: Cannot read property 'properties' of undefined
npm ERR! prepareGitDep     at module.exports (/home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/config-yargs.js:89:48)
npm ERR! prepareGitDep     at /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/webpack.js:60:27
npm ERR! prepareGitDep     at Object.<anonymous> (/home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/webpack.js:515:3)
npm ERR! prepareGitDep     at Module._compile (internal/modules/cjs/loader.js:701:30)
npm ERR! prepareGitDep     at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
npm ERR! prepareGitDep     at Module.load (internal/modules/cjs/loader.js:600:32)
npm ERR! prepareGitDep     at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
npm ERR! prepareGitDep     at Function.Module._load (internal/modules/cjs/loader.js:531:3)
npm ERR! prepareGitDep     at Module.require (internal/modules/cjs/loader.js:637:17)
npm ERR! prepareGitDep     at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! parchment@2.0.0-dev build: `webpack --config webpack.conf.js`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the parchment@2.0.0-dev build script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/frappe/.npm/_logs/2019-03-13T22_58_30_721Z-debug.log
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! parchment@2.0.0-dev prepare: `npm run build`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the parchment@2.0.0-dev prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/frappe/.npm/_logs/2019-03-13T22_58_30_857Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/frappe/.npm/_logs/2019-03-13T22_58_31_679Z-debug.log
frappe@vps [~/frappe-bench]#

Can you tell me what is going on and how can I solve it?

This procedure is among a software installation called frappe, but I had isolated the error and finally I have discovered that it is a NPM problem.

npm version is 6.4.1 running on Centos 7 operating system.

Regards

Jaime

From your debug log, which explicitly mentions This is probably not a problem with npm., it seems more like a problem with webpack, which is used in a custom build step in one of the packages. Someone mentioned that updating to the versions below might work.

    "webpack": "^4.20.2",
    "webpack-cli": "^3.1.1",

Hello,

Is there a way to update it globally? The fact is that package.json file is created magically by other script. For that script to work, I need to remove the folder where package.json is in. So I run the script and the package.json is regenerated.

However, I searched for “webpack” in that file and it was not found.

On the other hand, when I run “npm list” command when I am in the .json file folder, this is the output:

npm ERR! missing: awesomplete@^1.1.2, required by frappe@
npm ERR! missing: cookie@^0.3.1, required by frappe@
npm ERR! missing: express@^4.16.2, required by frappe@
npm ERR! missing: frappe-datatable@^1.8.0, required by frappe@
npm ERR! missing: frappe-gantt@^0.1.0, required by frappe@
npm ERR! missing: fuse.js@^3.2.0, required by frappe@
npm ERR! missing: highlight.js@^9.12.0, required by frappe@
npm ERR! missing: jsbarcode@^3.9.0, required by frappe@
npm ERR! missing: moment@^2.20.1, required by frappe@
npm ERR! missing: moment-timezone@^0.5.21, required by frappe@
npm ERR! missing: quill@2.0.0-dev.2, required by frappe@
npm ERR! missing: redis@^2.8.0, required by frappe@
npm ERR! missing: showdown@^1.8.6, required by frappe@
npm ERR! missing: socket.io@^2.0.4, required by frappe@
npm ERR! missing: superagent@^3.8.2, required by frappe@
npm ERR! missing: touch@^3.1.0, required by frappe@
npm ERR! missing: vue@^2.5.17, required by frappe@

I installed each module one by one, but as I told you, when I run the main script, that .json is regenerated, losing all modules I have installed.

Regards

Jaime

Since it isn’t an npm error as such, you might get more help asking in a Frappe context such as their GitHub Issues: https://github.com/frappe/frappe/issues

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.