liferay / liferay-js-toolkit

GNU Lesser General Public License v3.0
52 stars 41 forks source link

Not able to use liferay-npm-build-tools in Liferay DXP 7.0 #207

Closed jpdacunha closed 5 years ago

jpdacunha commented 5 years ago

Hello,

I try to use the angula6-npm-portlet in order to integrate Liferay DXP 7. 0 with angular 6

There is the command i used : blade samples angular6-npm-portlet

When i try to execute the deploy goal with graddle , Got the following error:

Gradle User Home: /home/dev/.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 3.0
Java Home: /usr/lib/jvm/java-8-oracle
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: deploy

:modules:angular6-posts-portlet:compileJava UP-TO-DATE
:modules:angular6-posts-portlet:buildCSS UP-TO-DATE
:modules:angular6-posts-portlet:processResources UP-TO-DATE
:downloadNode SKIPPED
:modules:angular6-posts-portlet:downloadNode SKIPPED
:modules:angular6-posts-portlet:expandJSCompileDependencies UP-TO-DATE
:modules:angular6-posts-portlet:npmInstall UP-TO-DATE
:modules:angular6-posts-portlet:npmRunBuild

> angular6-posts-portlet@1.0.0 build /home/dev/angular-liferay/LiferayDXP/eclipse-workspace/liferay-angular-samples/modules/angular6-posts-portlet
> tsc && liferay-npm-bundler

Bundling 13 dependencies...
{ Error: EEXIST: file already exists, link '/home/dev/angular-liferay/LiferayDXP/eclipse-workspace/liferay-angular-samples/modules/angular6-posts-portlet/build/resources/main/META-INF/resources/node_modules/tslib@1.9.3' -> '/home/dev/angular-liferay/LiferayDXP/eclipse-workspace/liferay-angular-samples/modules/angular6-posts-portlet/build/resources/main/META-INF/resources/node_modules/angular6-posts-portlet$tslib@1.9.3'
  errno: -17,
  code: 'EEXIST',
  syscall: 'link',
  path: '/home/dev/angular-liferay/LiferayDXP/eclipse-workspace/liferay-angular-samples/modules/angular6-posts-portlet/build/resources/main/META-INF/resources/node_modules/tslib@1.9.3',
  dest: '/home/dev/angular-liferay/LiferayDXP/eclipse-workspace/liferay-angular-samples/modules/angular6-posts-portlet/build/resources/main/META-INF/resources/node_modules/angular6-posts-portlet$tslib@1.9.3' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular6-posts-portlet@1.0.0 build: `tsc && liferay-npm-bundler`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular6-posts-portlet@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!     /home/dev/.npm/_logs/2018-09-25T15_50_52_120Z-debug.log
:modules:angular6-posts-portlet:npmRunBuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':modules:angular6-posts-portlet:npmRunBuild'.
> Process 'command '/home/dev/angular-liferay/LiferayDXP/eclipse-workspace/liferay-angular-samples/build/node/bin/node'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 17.962 secs

Full stack here

2018-09-25T15_50_52_120Z-debug.log

Thanks for your help

izaera commented 5 years ago

Hi @jpdacunha:

I have tried to reproduce your problem but gradle deploy worked perfectly for me.

Also, I'm not sure what can be causing the problem, because the bundler doesn't do any call to link system call at all. It just copies or transforms files, but never makes links AFAIK 🤔.

izaera commented 5 years ago

I'm closing this as it seems to be inactive (one month without response). Feel free to reopen it again if it still happens.