It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo with NPM, Webpack and Babel. Windows permissions ?

Hello guys, we are evaluating Bamboo CI to build our front end projects. We use Javascript, NPM, Webpack, ReactJS and Babel technology stack. When I create a build plan my repo gets checked out but the build fails since Babel doesn't seem to be compiling the files properly.

Weird thing is that this just happens in the build-dir directory. If I copy and paste the same project outside bamboo-home the whole build goes fine. 

At this point I am trying to build my project straight from the console and I see the same results. Is there any configuration or maybe permissions that I am missing here ?

 

Thanks in advance

Luis

1 answer

0 votes
jey Atlassian Team Feb 01, 2018

Hi Luis,

What does the bamboo build log complain? 

Weird thing is that this just happens in the build-dir directory.

I assume you are not able to compile your project within the build directory, but the compilation is successful when run outside. Am I right? 

This to me looks like a permission issue. Check if the bamboo user has appropriate permission to build in that directory.

We can tell you more with the build log snip.

it is not building/compiling from cmd either but just if I am inside build-dir. Like I said if I copy and paste the same project outside bamboo-home it builds as expected.

 

ERROR in ./index.js
Module parse failed: C:\opt\bamboo-home\xml-data\build-dir\STA-DEV-JOB1\node_modules\babel-loader\lib\index.js!C:\opt\bamboo-home\xml-data\build-dir\STA-DEV-JOB1\src\index.js Unexpected token (24:8)
You may need an appropriate loader to handle this file type.
| const render = (Component, target) => {
| ReactDOM.render(
| <Provider store={store}>
| <AppContainer>
| <Component/>
@ multi babel-polyfill react-hot-loader/patch ./index.js

 

It seems to me that it may be a permission issue as well but maybe with the OS (Windows in this case) or maybe a different environment is being used inside bamboo-home ...

This looks like some environment variables are not available for the user running Bamboo. Let's test that by creating a test plan and run the below commands in a shell task choosing Powershell as the interpreter.

echo "Full Path"
[Environment]::GetEnvironmentVariable("Path")
echo "System Path"
[Environment]::GetEnvironmentVariable("Path", "Machine")
echo "User Path"
[Environment]::GetEnvironmentVariable("Path", "User")
SET

This will just list the contents of each PATH variable and the list of environment variables available for that user.

You can then compare the result by running the same outside Bamboo and spot the difference and define new ones accordingly.

Hope that helps.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

449 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you