09-22-2017 05:07 AM
I created a new ADF application from scratch.
I can not start it. Will output error:
> alfresco@0.1.0 start /home/user/alfresco
> npm run server-versions && npm run webpack-dev-server -- --config config/webpack.prod.js --progress --content-base app/
npm WARN invalid config loglevel="notice"
> alfresco@0.1.0 server-versions /home/user/alfresco
> rimraf versions.json && npm list --depth=0 --json=true --prod=true > versions.json || exit 0
npm WARN invalid config loglevel="notice"
> alfresco@0.1.0 webpack-dev-server /home/user/alfresco
> node node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.prod.js" "--progress" "--content-base" "app/"
/home/user/alfresco/config/webpack.prod.js:90
... alfrescoLibs.map(lib => {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at requireConfig (/home/user/alfresco/node_modules/webpack/bin/convert-argv.js:96:18)
at /home/user/alfresco/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
npm ERR! Linux 4.4.0-87-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "webpack-dev-server" "--" "--config" "config/webpack.prod.js" "--progress" "--content-base" "app/"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! alfresco@0.1.0 webpack-dev-server: `node node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.prod.js" "--progress" "--content-base" "app/"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alfresco@0.1.0 webpack-dev-server script 'node node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.prod.js" "--progress" "--content-base" "app/"'.
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 alfresco package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.prod.js" "--progress" "--content-base" "app/"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs alfresco
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls alfresco
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/user/alfresco/npm-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alfresco@0.1.0 start: `npm run server-versions && npm run webpack-dev-server -- --config config/webpack.prod.js --progress --content-base app/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alfresco@0.1.0 start 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! /home/user/.npm/_logs/2017-09-22T08_57_10_450Z-debug.log
Log files attached to this issue.
Where is the mistake? How to fix it?
09-22-2017 05:15 AM
Please ensure you got the latest LTS version of node (6x, 8x will also work). Try removing the "node_modules" and "package-lock.json" (if present) and running "npm install" once again.
We are in the process of rolling out a brand new generator (2.0.0 beta 1) with multiple blueprints support and Angular CLI as a base, so you can check later today and test it as well.
09-22-2017 06:22 AM
I use "node-v8.5.0-linux-x64". I did as you recommended - deleted the folder "node_modules", the "package-lock.json" file did not exist. I gave the command to install again. But it did not help. As a result, the same error.
09-22-2017 06:26 AM
The "npm-debug.log" file you have attached says that you got:
2 info using npm@3.5.2
3 info using node@v4.2.6
...
20 error node v4.2.6
21 error npm v3.5.2
The second log file says:
2 info using npm@5.3.0
3 info using node@v4.2.6
...
17 verbose argv "/usr/bin/nodejs" "/home/user/node-v8.5.0-linux-x64/bin/npm" "start"
18 verbose node v4.2.6
19 verbose npm v5.3.0
09-22-2017 10:13 AM
Indeed, you are right. Thanks for your patience and help)
Explore our Alfresco products with the links below. Use labels to filter content by product module.