Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

bitbucket pipelines build is not working correctly

sschroders May 6, 2024

Hi, 

I have a react site which i want to build and deploy using bitbucket pipelines. my pipeline runs and deploys the content of the dist folder in what seems to be correct manner. the correct files appear on my azure storage. however when i try opening the site I get the following error:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.

I am using yarn and vite.

 

image: node:20.11.1 #atlassian/default-image:3

definitions:
caches:
yarn: node_modules

pipelines:
branches:
master:
- step:
name: 'Build'
caches:
- yarn
script:
- echo "Your build and test goes here..."
- yarn
- yarn build
artifacts:
- dist/**

2 answers

1 accepted

1 vote
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 16, 2024

@sschroders hi. New version azure-storage-deploy:2.4.0 released, which will automatically guess the content-type of files.

Please, provide feedback if this version solved your problem.

Regards, Igor

sschroders May 16, 2024

thanks

Like Igor Stoyanov likes this
1 vote
sschroders May 6, 2024

Edit after some digging I found out the problem is with the deploy as it deploys everything with the wrong content type (application/octet-stream) I am using atlassian/azure-storage-deploy:2.2.1 pipe to deploy.

sschroders May 7, 2024

@Igor Stoyanov any chance you can help me with this?

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2024

@sschroders hi. Azure automatically set the default application/octet-stream content type. I will try to provide a solution for this case in future releases.

Regards, Igor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events