Not too sure what is causing this error as npm install works fine on other computers.
NPM and Node versions:
C:\Users\Work>npm -v
8.3.2
C:\Users\Work>node -v
v14.16.1
Here is my log file:
1045 timing metavuln:calculate:security-advisory:laravel-mix:BsF+UACSDcae51QqbAQxlxsAnxFUZFgrvDV6vu6cKmFKYbSYdVVZnALm0hmDv4dJ/hBksQh4SoHNXqfEVpN6eg== Completed in 4ms
1046 verbose stack TypeError: Cannot read property 'name' of null
1046 verbose stack at npa (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-package-arg\npa.js:25:18)
1046 verbose stack at FetcherBase.get (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetcher.js:486:16)
1046 verbose stack at Object.packument (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\index.js:18:30)
1046 verbose stack at Calculator.[packument] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\metavuln-calculator\lib\index.js:105:22)
1046 verbose stack at Calculator.[calculate] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\metavuln-calculator\lib\index.js:56:23)
1046 verbose stack at Calculator.calculate (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\metavuln-calculator\lib\index.js:43:31)
1046 verbose stack at Map.[init] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\audit-report.js:173:36)
1046 verbose stack at async Map.run (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\audit-report.js:108:7)
1047 verbose cwd D:\code\click-webplanner
1048 verbose Windows_NT 10.0.19042
1049 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
1050 verbose node v14.16.1
1051 verbose npm v7.20.3
1052 error Cannot read property 'name' of null
1053 verbose exit 1
And this is my composer file:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.16.2",
"bootstrap-sass": "^3.4.0",
"cross-env": "^5.0.1",
"deepmerge": "^4.2.2",
"fibers": "^5.0.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"lodash": "^4.17.4",
"sass": "^1.26.8",
"sass-loader": "^8.0.2",
"save": "^2.3.3",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue": "^2.6.3",
"vue-template-compiler": "^2.6.3",
"webpack": "^4.43.0"
},
"dependencies": {
"#babel/core": "^7.3.4",
"#babel/plugin-syntax-dynamic-import": "^7.8.3",
"#babel/preset-env": "^7.4.4",
"#tailwindcss/postcss7-compat": "^2.0.2",
"ajv": "^6.8.1",
"autoprefixer": "^9.8.6",
"axios-cancel": "^0.2.2",
"date-fns": "^2.0.0-alpha.27",
"dayjs": "^1.8.28",
"flatpickr": "^4.5.2",
"highlight.js": "^10.1.2",
"laravel-echo": "^1.5.3",
"laravel-mix": "^5.0.4",
"marked": "latest",
"moment": "^2.29.1",
"npm": "^6.9.0",
"postcss": "^7.0.35",
"prismjs": "^1.23.0",
"prosemirror-utils": "^0.6.7",
"pusher-js": "^4.4.0",
"sweetalert": "^2.1.0",
"sweetalert2": "^7.33.1",
"tailwindcss": "npm:#tailwindcss/postcss7-compat#^2.0.2",
"tiptap": "^0.19.0",
"tiptap-extensions": "^0.21.0",
"vue-bulma-datepicker": "^1.3.6",
"vue-fuse": "^3.0.0",
"vue-select": "^3.1.0",
"vue-select2": "^0.2.6",
"vue-sidebar-menu": "^3.7.0",
"vue2-editor": "^2.6.6",
"vuedraggable": "^2.17.0",
"vuetify": "^2.2.33",
"vuetify-loader": "^1.4.4"
}
}
This error is occurring with the npm version that you are using: v8.3.2 and the way that you passing the version of the module "tailwindcss": "npm:#tailwindcss/postcss7-compat#^2.0.2"
If you remove this library will see that the error will stop to happen.
To solve this you can change the tailwindcss version to ^2.0.1-compat:
"tailwindcss": "^2.0.1-compat"
Or upgrade or downgrade your npm version:
Try to downgrade your node.js and npm version for other lts version like the lts/fermium (node v14.19.0, npm v6.14.16) or upgrade to the stable version (node v17.5.0, npm v8.4.1)
Also, the recommended version for the npm with the node version v14.16.1 is the is 6.14.12 and not 8.3.2 as we can see in the releases table.
When you change the npm version you will need:
Delete the node_modules directory and package-lock.json file.
Reinstall the modules using npm install
Related
I am working with a the Airframe React template and the steps are pretty straightforward: Unzip and run npm install from the project directory. The problem is that I get the following error when I run npm install:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: airframe-dashboard#0.1.0
npm ERR! Found: eslint#6.8.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#"^4.19.1 || ^5.3.0" from eslint-config-airbnb#17.1.1
npm ERR! node_modules/eslint-config-airbnb
npm ERR! dev eslint-config-airbnb#"^17.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\leord\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\leord\AppData\Local\npm-cache\_logs\2022-06-15T05_07_36_689Z-debug-0.log
I tried using --legacy-peer-deps, or changing the entry "devDependencies.eslint" to "*" and to "^5.3.0" in the package.json file, but now it runs with the following error:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\leord\AppData\Local\npm-cache\_logs\2022-06-15T05_11_22_330Z-debug-0.log
I also tried reinstalling Node and npm. What I find weird is that I haven't changed anything in the project and I can't run it.
I have tried it from both Windows 11 and WSL2. My IDE is WebStorm and everything is up to date.
The complete (original) package.json file has the following dependencies:
{
"name": "airframe-dashboard",
"version": "0.1.0",
"description": "Seed project for flexible light React/Bootstrap 4 dashboards.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run start:dev",
"build:dev": "node ./build/cli-tools.js --clear dist --create dist && webpack --config ./build/webpack.config.client.dev.js",
"build:prod": "node ./build/cli-tools.js --clear dist --create dist && webpack --config ./build/webpack.config.client.prod.js",
"start:dev": "node ./build/cli-tools.js --clear dist --create dist && webpack-dev-server --config ./build/webpack.config.client.dev.js",
"start:prod": "node ./build/cli-tools.js --clear dist --create dist && webpack-dev-server --config ./build/webpack.config.client.prod.js"
},
"author": "Webkom",
"license": "ISC",
"devDependencies": {
"#babel/cli": "^7.4.4",
"#babel/core": "^7.4.5",
"#babel/plugin-proposal-class-properties": "^7.4.4",
"#babel/plugin-syntax-dynamic-import": "^7.2.0",
"#babel/preset-env": "^7.4.5",
"#babel/preset-react": "^7.0.0",
"autoprefixer": "^9.6.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.6",
"babel-plugin-universal-import": "^4.0.0",
"circular-dependency-plugin": "^5.0.2",
"commander": "^2.20.0",
"css-loader": "^3.1.0",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.13.0",
"extract-css-chunks-webpack-plugin": "^4.5.2",
"file-loader": "^4.0.0",
"html-webpack-plugin": "^3.2.0",
"mkdirp": "^0.5.1",
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss-loader": "^3.0.0",
"raw-loader": "^3.0.0",
"rimraf": "^2.6.3",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.3.0",
"webpack": "^4.33.0",
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.7.1"
},
"dependencies": {
"#babel/polyfill": "^7.4.4",
"#owczar/dashboard-style--airframe": "^0.1.13",
"ag-grid-community": "^21.0.1",
"ag-grid-react": "^21.0.1",
"bootstrap": "^4.3.1",
"faker": "^4.1.0",
"font-awesome": "^4.7.0",
"holderjs": "^2.9.6",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"node-fetch": "^2.6.0",
"numeral": "^2.0.6",
"prop-types": "^15.7.2",
"query-string": "^6.7.0",
"rc-slider": "^8.6.13",
"react": "^16.8.6",
"react-beautiful-dnd": "^11.0.4",
"react-big-calendar": "^0.22.0",
"react-bootstrap-table-next": "^3.1.4",
"react-bootstrap-table2-editor": "^1.2.4",
"react-bootstrap-table2-filter": "^1.1.9",
"react-bootstrap-table2-paginator": "^2.0.6",
"react-bootstrap-table2-toolkit": "^2.0.1",
"react-bootstrap-typeahead": "^4.0.0-alpha.9",
"react-datepicker": "^2.7.0",
"react-dom": "^16.8.6",
"react-dropzone": "^10.1.5",
"react-grid-layout": "^0.16.6",
"react-helmet": "^5.2.1",
"react-hot-loader": "^4.11.0",
"react-image-crop": "^8.0.2",
"react-quill": "^1.3.3",
"react-responsive": "^7.0.0",
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1",
"react-text-mask": "^5.4.3",
"react-toastify": "^5.2.1",
"react-toggle": "^4.0.2",
"react-universal-component": "^4.0.0",
"reactstrap": "^8.0.0",
"recharts": "^1.6.2",
"text-mask-addons": "^3.8.0",
"uuid": "^3.3.2",
"webpack-cli": "^3.1.0",
"webpack-flush-chunks": "^2.0.3"
}
}
How can I resolve the dependency conflict?
UPDATE:
Turns out I did not have Git installed. After installing it, trying npm install in the project's root folder gives me the following error:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/Marak/faker.js.git
npm ERR! Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
npm ERR! git#github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\leord\AppData\Local\npm-cache\_logs\2022-06-15T07_03_08_129Z-debug-0.log
Why do I need access to that git repo?
Try using --force.
What is ur node/npm version?
I'm used to React and doing npm start to get my app running locally. However, when I run that on my new project it prompts that there is no start script. And upon further inspection, there isn't one.
If this is what my package.json looks like how do I get this running locally?
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"#fortawesome/fontawesome-free": "^5.13.0",
"axios": "^0.19",
"bootstrap": "^4.5.0",
"cross-env": "^7.0",
"datatables.net": "^1.10.22",
"datatables.net-bs4": "^1.10.22",
"datatables.net-plugins": "^1.10.22",
"install": "^0.13.0",
"jquery": "^3.5.1",
"laravel-mix": "^5.0.9",
"lodash": "^4.17.20",
"moment-timezone": "^0.5.32",
"npm": "^6.14.9",
"popper.js": "^1.16.1",
"resolve-url-loader": "^3.1.2",
"sass": "^1.20.1",
"sass-loader": "^8.0.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"vue-recaptcha-v3": "^1.9.0"
}
}
It's a Laravel environment using PHP for back end and Vue for front end. I feel really stupid for not knowing this, but when I search I'm also not finding anything.
I'm using PhpStorm, I downloaded XAMPP, Composer, and PHP. I'm not sure what I'm missing or need to do? Help, please. If I'm missing any information I can certainly provide it to the best of my ability.
I'm a dingbat, I realized I wasn't running backend. So.. I did php artisan serve and received this. Any suggestions?
[![enter code here][2]][2]
C:\Users\emzib\ValorSystems.com>php artisan serve
PHP Warning: require(C:\Users\emzib\ValorSystems.com/vendor/autoload.php): Failed to open stream: No such file or directory in C:\Users\emzib\ValorSystems.com\artisan on line 18
PHP Fatal error: Uncaught Error: Failed opening required 'C:\Users\emzib\ValorSystems.com/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Users\emzib\ValorSystems.com\artisa
n:18
Stack trace:
#0 {main}
thrown in C:\Users\emzib\ValorSystems.com\artisan on line 18
Try below steps
composer install
npm install
npm run dev
i'm new to prestashop theme development.
i had setup my local enviroment and all works fine.
i try to build a theme from the classic default theme.
i go into the _dev folted inside the theme and run "npm install".
next i run "npm run build" to run the script: "build": "NODE_ENV=production webpack --progress --colors --debug --display-chunks"
and i get the following error:
> ADMIN#DESKTOP-5JOQKQA MINGW64 /c/laragon/www/PrestaShopDev/themes/prodet/_dev ((1.7.7.0))
> $ npm run build
>
> > prestashop-classic-dev-tools#1.0.0 build C:\laragon\www\PrestaShopDev\themes\prodet\_dev
> > NODE_ENV=production webpack --progress --colors --debug --display-chunks
>
> [webpack-cli] Unknown argument: --colors
> Did you mean --color?
> [webpack-cli] Unknown argument: --debug
> [webpack-cli] Unknown argument: --display-chunks
> Note: This command was run via npm module 'win-node-env'
> npm ERR! code ELIFECYCLE
> npm ERR! errno 2
> npm ERR! prestashop-classic-dev-tools#1.0.0 build: `NODE_ENV=production webpack --progress --colors --debug
> --display-chunks`
> npm ERR! Exit status 2
> npm ERR!
> npm ERR! Failed at the prestashop-classic-dev-tools#1.0.0 build script.
> npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
>
> npm ERR! A complete log of this run can be found in:
> npm ERR! C:\Users\ADMIN\AppData\Roaming\npm-cache\_logs\2020-12-11T16_17_37_009Z-debug.log
how can i fix it?
here is the package.json file:
{
"name": "prestashop-classic-dev-tools",
"version": "1.0.0",
"description": "Tools to help while developing the Classic theme",
"main": "index.js",
"scripts": {
"build": "NODE_ENV=production webpack --progress --colors --debug --display-chunks",
"watch": "webpack --progress --colors --debug --display-chunks --watch"
},
"author": "PrestaShop",
"license": "AFL-3.0",
"devDependencies": {
"autoprefixer": "^6.7.7",
"babel-loader": "^8.2.2",
"bootstrap": "4.0.0-alpha.5",
"bootstrap-touchspin": "^3.1.1",
"bourbon": "^4.2.6",
"css-loader": "^5.0.1",
"expose-loader": "^0.7.3",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"flexibility": "^1.0.5",
"jquery": "^3.5.1",
"jquery-touchswipe": "^1.6",
"jquery.browser": "^0.1.0",
"material-design-icons": "^2.1.3",
"node-sass": "^4.14.1",
"notosans-fontface": "~1.0.1",
"postcss-flexibility": "^1.0.2",
"postcss-loader": "^1.3.3",
"sass-loader": "^6.0.3",
"style-loader": "^0.14.1",
"tether": "^1.1.1",
"velocity-animate": "^1.2.3",
"webpack": "^5.10.0",
"webpack-cli": "^4.2.0",
"webpack-sources": "^0.1.0"
}
}
my node version is:
$ node -v
v10.18.1
my npm version is:
$ npm -v
6.13.4
i really don't understand how to fix this.
I am also new to prestashop development.
I had the same error.
I solved it using a second clone of the classic folder.
the error is probably due to the webpack version.
Here is the package.json
{
"name": "prestashop-classic-dev-tools",
"version": "1.0.0",
"description": "Tools to help while developing the Classic theme",
"main": "index.js",
"scripts": {
"build": "NODE_ENV=production webpack --progress --colors --debug --display-chunks",
"watch": "webpack --progress --colors --debug --display-chunks --watch"
},
"author": "PrestaShop",
"license": "AFL-3.0",
"devDependencies": {
"autoprefixer": "^6.7.7",
"babel-loader": "^5.3.2",
"bootstrap": "4.0.0-alpha.5",
"bootstrap-touchspin": "^3.1.1",
"bourbon": "^4.2.6",
"css-loader": "^0.27.3",
"expose-loader": "^0.7.3",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"flexibility": "^1.0.5",
"jquery": "^2.1.4",
"material-design-icons": "^2.1.3",
"node-sass": "^4.14.1",
"notosans-fontface": "~1.0.1",
"postcss-flexibility": "^1.0.2",
"postcss-loader": "^1.3.3",
"sass-loader": "^6.0.3",
"style-loader": "^0.14.0",
"tether": "^1.1.1",
"velocity-animate": "^1.2.3",
"webpack": "^2.2.1",
"webpack-sources": "^0.1.0"
}
}
in the clone after
npm install
npm run build
For me, it worked and compiles the theme
Error on npm run build. Updating the node-modules or clearing the cache didn't work. Updating the scripts even didn't work. Couldn't resolve the following error
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\Bhargavii Nadendla\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#6.0.1
3 info using node#v8.11.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle udemy-nodejs-angular2#1.0.0~prebuild: udemy-nodejs-angular2#1.0.0
6 info lifecycle udemy-nodejs-angular2#1.0.0~build: udemy-nodejs-angular2#1.0.0
7 verbose lifecycle udemy-nodejs-angular2#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle udemy-nodejs-angular2#1.0.0~build: PATH: C:\Users\Bhargavii Nadendla\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Bhargavii Nadendla\Desktop\Angular-Udemy\seed-project\node_modules.bin;C:\Users\Bhargavii Nadendla\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Bhargavii Nadendla\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_171\bin;C:\HashiCorp\Vagrant\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\nodejs;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Bhargavii Nadendla\Python\Scripts;C:\Users\Bhargavii Nadendla\Python;C:\Users\Bhargavii Nadendla\AppData\Local\Microsoft\WindowsApps;C:\Users\Bhargavii Nadendla\AppData\Local\GitHubDesktop\bin;C:\Users\Bhargavii Nadendla\AppData\Roaming\npm;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle udemy-nodejs-angular2#1.0.0~build: CWD: C:\Users\Bhargavii Nadendla\Desktop\Angular-Udemy\seed-project
10 silly lifecycle udemy-nodejs-angular2#1.0.0~build: Args: [ '/d /s /c',
10 silly lifecycle 'del-cli public/js/app && webpack --config webpack.config.dev.js --progress --profile --watch' ]
11 silly lifecycle udemy-nodejs-angular2#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle udemy-nodejs-angular2#1.0.0~build: Failed to exec build script
13 verbose stack Error: udemy-nodejs-angular2#1.0.0 build: del-cli public/js/app && webpack --config webpack.config.dev.js --progress --profile --watch
13 verbose stack Exit status 1
c
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:\Users\Bhargavii Nadendla\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid udemy-nodejs-angular2#1.0.0
15 verbose cwd C:\Users\Bhargavii Nadendla\Desktop\Angular-Udemy\seed-project
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Bhargavii Nadendla\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v8.11.2
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 1
22 error udemy-nodejs-angular2#1.0.0 build: del-cli public/js/app && webpack --config webpack.config.dev.js --progress --profile --watch
22 error Exit status 1
23 error Failed at the udemy-nodejs-angular2#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Here, I upload the package.json
{
"name": "udemy-nodejs-angular2",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"build": "del-cli public/js/app && webpack --config webpack.config.dev.js --progress --profile --watch",
"build:prod": "del-cli public/js/app && ngc -p tsconfig.aot.json && ngc -p tsconfig.aot.json && webpack --config webpack.config.prod.js --progress --profile --bail && del-cli 'assets/app/**/*.js' 'assets/app/**/*.ngsummary.json' 'assets/app/**/*.ngstyle.*'"
},
"dependencies": {
"#angular/animations": "^5.0.0",
"#angular/common": "^5.0.0",
"#angular/compiler": "^5.0.0",
"#angular/compiler-cli": "^5.0.0",
"#angular/core": "^5.0.0",
"#angular/forms": "^5.0.0",
"#angular/http": "^5.0.0",
"#angular/platform-browser": "^5.0.0",
"#angular/platform-browser-dynamic": "^5.0.0",
"#angular/platform-server": "^5.0.0",
"#angular/router": "^5.0.0",
"#angular/upgrade": "^5.0.0",
"body-parser": "~1.15.2",
"cookie-parser": "~1.4.3",
"core-js": "^2.4.1",
"debug": "~2.2.0",
"express": "~4.14.0",
"hbs": "~3.1.0",
"mongoose": "^5.1.3",
"mongoose-unique-validator": "^2.0.1",
"morgan": "~1.6.1",
"reflect-metadata": "^0.1.3",
"rxjs": "^5.5.11",
"serve-favicon": "~2.3.0",
"zone.js": "^0.8.5"
},
"devDependencies": {
"#ngtools/webpack": "^1.8.0",
"#types/core-js": "0.9.36",
"#types/node": "^6.0.45",
"angular-router-loader": "^0.5.0",
"angular2-template-loader": "^0.5.0",
"awesome-typescript-loader": "^3.1.2",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"del-cli": "^0.2.0",
"html-loader": "^0.4.4",
"raw-loader": "^0.5.1",
"ts-loader": "^2.0.3",
"typescript": "^2.4.2",
"webpack": "^2.7.0",
"webpack-merge": "^4.1.0"
}
}
I've installed with ubuntu on your same package.json and it worked just fine.
I'm using node V8.11, npm 6.10;
It seems that you are using node 6.0 in your machine and node 8.0;
First, a good try is to update your npm to 6.10 and your node to a newer version, or just reinstall node. But it is more likely to be your user having no access to finish the build proccess as you can see in
`
14 verbose pkgid udemy-nodejs-angular2#1.0.0
15 verbose cwd C:\Users\Bhargavii Nadendla\Desktop\Angular-Udemy\seed-project
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Bhargavii Nadendla\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v8.11.2
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 1
22 error udemy-nodejs-angular2#1.0.0 build: `del-cli public/js/app && webpack --config webpack.config.dev.js --progress --profile --watch`
22 error Exit status 1
`
Whenever that happen i just run sudo on ubuntu and it is fixed. What are the permissions that your user have in the project folder node_modules and essentially in "C:\\Users\\Bhargavii Nadendla\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" ?
If it is not permission related, try out to install a newer version of node and point it out to C: removing it from AppData of windows, this can actually cause a access permission fail.
I start npm but see error , i don't know fix. please help me
"D:\PhpStorm 2016.1.2\bin\runnerw.exe" D:\nodejs\node.exe D:\nodejs\node_modules\npm\bin\npm-cli.js run-script start
> pickuphub#0.3.0 start E:\phong.pham\Developer\phpDev\pickuphub.net
> npm run start:tunnel
> pickuphub#0.3.0 start:tunnel E:\phong.pham\Developer\phpDev\pickuphub.net
> cross-env NODE_ENV=development node internals/server
CarteBlanche started at /carte-blanche
Server started ✓
Access URLs:
-----------------------------------
Localhost: http://localhost:3000
LAN: http://192.168.0.107:3000
-----------------------------------
Press CTRL-C to stop
Error:
Uncaught Exception...
TypeError: d.getWarnings is not a function
at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:594:21
at Array.forEach (native)
at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:593:22
at Array.forEach (native)
at Compilation.reportDependencyWarnings (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:592:9)
at Compilation.<anonymous> (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:483:8)
at Array.forEach (native)
at Compilation.seal (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:482:15)
at Compiler.<anonymous> (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compiler.js:431:15)
at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\node_modules\tapable\lib\Tapable.js:152:11
Uncaught Exception...
undefined
Error:
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "C:\Users\phamv\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "start:tunnel"
npm ERR! node v4.4.5
npm ERR! npm v3.9.6
npm ERR! code ELIFECYCLE
npm ERR! pickuphub#0.3.0 start:tunnel: cross-env NODE_ENV=development node internals/server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pickuphub#0.3.0 start:tunnel script 'cross-env NODE_ENV=development node internals/server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pickuphub package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development node internals/server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pickuphub
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pickuphub
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\phong.pham\Developer\phpDev\pickuphub.net\npm-debug.log
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "start"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! pickuphub#0.3.0 start: `npm run start:tunnel`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pickuphub#0.3.0 start script 'npm run start:tunnel'.
npm ERR! This is most likely a problem with the pickuphub package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run start:tunnel
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pickuphub
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pickuphub
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\phong.pham\Developer\phpDev\pickuphub.net\npm-debug.log
Process finished with exit code 1
i begin learn reactjs and using nodejs . please help me
package.json
{
"name": "pickuphub",
"version": "0.3.0",
"private": true,
"dllPlugin": {
"path": "node_modules/pickuphub-dlls",
"exclude": [
"sanitize.css"
],
"include": [
"babel-polyfill",
"core-js",
"eventsource-polyfill",
"lodash"
]
},
"dependencies": {
"angle-input": "git+https://github.com/hosmelq/angle-input.git",
"babel-polyfill": "^6.9.1",
"classnames": "^2.2.5",
"date-fns": "^1.3.0",
"draft-js": "^0.7.0",
"elemental": "^0.5.14",
"history": "^3.0.0",
"humps": "^1.1.0",
"immutable": "^3.8.1",
"is-absolute-url": "^2.0.0",
"lodash-es": "^4.13.1",
"moment": "^2.13.0",
"normalizr": "^2.1.0",
"query-string": "^4.2.2",
"raven-js": "^3.1.0",
"rc-switch": "^1.4.2",
"rc-tooltip": "^3.3.5",
"react": "^15.1.0",
"react-addons-css-transition-group": "^15.1.0",
"react-addons-shallow-compare": "^15.1.0",
"react-dom": "^15.1.0",
"react-dropzone": "^3.5.1",
"react-highlighter": "^0.3.2",
"react-immutable-proptypes": "^1.7.1",
"react-masonry-component": "^4.0.4",
"react-modal": "^1.3.0",
"react-nl2br": "^0.1.1",
"react-redux": "^4.4.5",
"react-relay": "^0.9.0",
"react-router": "^2.5.0",
"react-router-redux": "^4.0.5",
"react-router-relay": "^0.13.3",
"react-router-scroll": "^0.2.0",
"react-select": "^1.0.0-beta9",
"react-slick": "^0.12.2",
"react-url": "^1.0.0",
"reactable": "^0.13.2",
"recompose": "^0.20.0",
"recompose-relay": "^0.3.0",
"redux": "^3.5.2",
"redux-api-middleware": "^1.0.2",
"redux-form": "^5.2.5",
"redux-immutable": "^3.0.6",
"redux-saga": "^0.10.5",
"reselect": "^2.5.1",
"sanitize.css": "^4.0.0",
"speakingurl": "^9.0.0",
"superagent": "^2.0.0",
"validator": "^5.4.0",
"whatwg-fetch": "^1.0.0"
},
"devDependencies": {
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-plugin-react-relay": "^0.9.0",
"babel-plugin-transform-react-constant-elements": "^6.9.1",
"babel-plugin-transform-react-inline-elements": "^6.8.0",
"babel-plugin-transform-react-pure-class-to-function": "^1.0.1",
"babel-plugin-transform-react-remove-prop-types": "^0.2.7",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-webpack": "^6.4.1",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-0": "^6.5.0",
"babel-runtime": "^6.9.2",
"bootstrap": "github:twbs/bootstrap#v4-dev",
"bootstrap-datepicker": "^1.6.1",
"carte-blanche": "^0.2.3",
"carte-blanche-react-plugin": "^0.2.2",
"carte-blanche-source-plugin": "^0.1.0",
"chalk": "^1.1.3",
"chart.js": "^1.1.1",
"compression": "^1.6.2",
"cross-env": "^1.0.8",
"css-loader": "^0.23.1",
"enzyme": "^2.3.0",
"eonasdan-bootstrap-datetimepicker": "^4.15.35",
"eventsource-polyfill": "^0.9.6",
"expect": "^1.20.1",
"expect-jsx": "^2.6.0",
"exports-loader": "^0.6.3",
"expose-loader": "^0.7.1",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"fastclick": "^1.0.6",
"file-loader": "^0.9.0",
"font-awesome": "^4.6.3",
"gmaps": "^0.4.24",
"gulp": "^3.9.1",
"handlebars": "^4.0.5",
"highcharts": "^4.2.5",
"hint.css": "^2.3.1",
"image-webpack-loader": "^1.8.0",
"imports-loader": "^0.6.5",
"ip": "^1.1.3",
"jquery": "^2.2.4",
"jquery-ui-touch-punch": "^0.2.3",
"jquery.maskedinput": "^1.4.1",
"json-loader": "^0.5.4",
"laravel-elixir": "^6.0.0-4",
"laravel-elixir-uncss": "^2.1.0",
"material-design-icons": "^2.2.3",
"minimist": "^1.2.0",
"ngrok": "^2.2.1",
"normalize.css": "^4.1.1",
"offline-plugin": "^3.4.0",
"plop": "^1.5.0",
"postcss-cssnext": "^2.6.0",
"postcss-focus": "^1.0.0",
"postcss-import": "8.1.0",
"postcss-loader": "^0.9.1",
"postcss-reporter": "^1.3.3",
"progressbar.js": "^1.0.1",
"raw-loader": "^0.5.1",
"rc-slider": "^3.7.2",
"react-bootstrap-table": "^2.3.6",
"react-motion": "^0.4.4",
"rimraf": "^2.5.2",
"select2": "^4.0.3",
"select2-bootstrap-theme": "0.1.0-beta.7",
"shelljs": "^0.7.0",
"style-loader": "^0.13.1",
"sw-precache": "^3.2.0",
"sweetalert": "^1.1.3",
"twitter-bootstrap-wizard": "^1.2.0",
"url-loader": "^0.5.7",
"webpack": "^2.1.0-beta.13",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.10.0",
"webpack-manifest-plugin": "^1.0.1",
"why-did-you-update": "0.0.8"
},
"engines": {
"npm": ">=3"
},
"react-relay-schema": "http://api.pickuphub.net/schema.json",
"scripts": {
"analyze": "node ./internals/scripts/analyze.js",
"build": "npm run build:clean && npm run build:webpack && npm run build:gulp",
"build:clean": "rimraf ./web/build-webpack/*",
"build:dll": "node ./internals/scripts/dependencies.js",
"build:gulp": "gulp --production",
"build:webpack": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --bail --color",
"generate": "plop --plopfile internals/generators/index.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"postinstall": "npm run build:dll",
"postsetup": "npm run build:dll",
"preinstall": "npm run npmcheckversion",
"start": "npm run start:tunnel",
"start:tunnel": "cross-env NODE_ENV=production node internals/server"
}
}
I'm having the exact same issue right after adding "carte-blanche" to a project which was fine working before. As the error states in your console... to start investigate, just go to your "node_modules/webpack/lib/Compilation.js" file and scroll to the line "594" (exactly like the error tells you). Then on this line 594, i've modified the file a bit:
if (!d.getWarnings) {
console.info('doh!', d.module.dependenciesErrors);
}
Well i'm already a bit further now as i'm only outputting the "module.dependenciesErrors", but you could start by simply outputting "d".
As the error tells you, "d.getWarnings" is not a function! With the if we can detect the error case and with the "console.info" we can start investigating.
Now i still have no clue at all why "d" has suddenly no "getWarnings" function anymore, where all other d's obviously have it (or webpack Compilation would never have worked :P)
But now i'm starting to see what the real causes are, causing the error finally i guess -> carte-blanche is not finding some folders -.- Extremely annoying this can't be just reported to the console...
I think this "d.getWarnings is not a function" can happen with all possible dependencies problems/errors - it won't be related directly to carte-blanche, or the :tunnel script mentioned here or whatever. I think everything what goes wrong during dependencies build in a webpack project can cause this.