You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Whenever I try to implement Pipelines, I got this error message during npm build time.
`Module not found: Error: Can't resolve '@sentry/react' in '/opt/atlassian/pipelines/agent/build/src'`
To fix this error, I put below command in bitbucket-pipelines.yml file but still build module not found error is happened.
```
```
How can I fix this module issue during pipeline work?
Build is working well in local environment and also Jenkins environment.
Hi @Alice Kim and welcome to the community!
Which command is giving you this error? I assume it is the command CI=false npm run build ?
I see that you are installing dependencies in the previous step named 'installing dependencies...'. Are these dependencies needed in order to run the build in the next step, 'Building project'? If so, I would suggest building the project in the same step where you install the dependencies, and then checking if that eliminates the error.
For every step in your bitbucket-pipelines.yml file, a Docker container starts, your repo is cloned (unless you have disabled clone), then the commands of that step's script are executed, and afterwards the container gets destroyed. If you need any dependencies to run a build, they should be installed in the same step that uses them.
I see that you are using node cache, but please keep in mind that (1) caches are saved after the first successful build, and (2) caches are cleared automatically after 1 week and repopulated during the next successful build. Therefore, builds should be configured to work whether or not the cache is present.
Kind regards,
Theodora
I don't know why it is working now but it works.
Thank you for your kindful answer. 🥲
Later if it is not working then I'll try your suggestion!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.