Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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


1 answer

0 votes
Jeyanthan I 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"
echo "System Path"
[Environment]::GetEnvironmentVariable("Path", "Machine")
echo "User Path"
[Environment]::GetEnvironmentVariable("Path", "User")

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

Atlassian Community Events