R
Railway

✋|help

nixpacks build error

KKapatiD4/17/2023
=> ERROR [ 9/10] RUN dotnet publish --no-restore -c Release -o out 6.2s
------
> [ 9/10] RUN dotnet publish --no-restore -c Release -o out:
#13 1.291 MSBuild version 17.3.2+561848881 for .NET
#13 5.502 ticketing-system -> /app/bin/Release/net6.0/ticketing-system.dll
#13 5.530 v18.12.1
#13 5.533 Restoring dependencies using 'npm'. This may take several minutes...
#13 5.929
#13 5.929 > react-ts@0.0.0 build
#13 5.929 > tsc && vite build
#13 5.929
#13 5.997 node:internal/modules/cjs/loader:998
#13 5.997 throw err;
#13 5.997 ^
#13 5.997
#13 6.032 EXEC : error : Cannot find module '/app/ClientApp/node_modules/typescript/bin/tsc' [/app/ticketing-system.csproj]
#13 6.032 at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
#13 6.032 at Module._load (node:internal/modules/cjs/loader:841:27)
#13 6.032 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
#13 6.032 at node:internal/main/run_main_module:23:47 {
#13 6.032 code: 'MODULE_NOT_FOUND',
#13 6.032 requireStack: []
#13 6.032 }
#13 6.032
#13 6.032 Node.js v18.12.1
#13 6.032 /app/ticketing-system.csproj(57,3): error MSB3073: The command "npm run build" exited with code 1.
------
=> ERROR [ 9/10] RUN dotnet publish --no-restore -c Release -o out 6.2s
------
> [ 9/10] RUN dotnet publish --no-restore -c Release -o out:
#13 1.291 MSBuild version 17.3.2+561848881 for .NET
#13 5.502 ticketing-system -> /app/bin/Release/net6.0/ticketing-system.dll
#13 5.530 v18.12.1
#13 5.533 Restoring dependencies using 'npm'. This may take several minutes...
#13 5.929
#13 5.929 > react-ts@0.0.0 build
#13 5.929 > tsc && vite build
#13 5.929
#13 5.997 node:internal/modules/cjs/loader:998
#13 5.997 throw err;
#13 5.997 ^
#13 5.997
#13 6.032 EXEC : error : Cannot find module '/app/ClientApp/node_modules/typescript/bin/tsc' [/app/ticketing-system.csproj]
#13 6.032 at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
#13 6.032 at Module._load (node:internal/modules/cjs/loader:841:27)
#13 6.032 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
#13 6.032 at node:internal/main/run_main_module:23:47 {
#13 6.032 code: 'MODULE_NOT_FOUND',
#13 6.032 requireStack: []
#13 6.032 }
#13 6.032
#13 6.032 Node.js v18.12.1
#13 6.032 /app/ticketing-system.csproj(57,3): error MSB3073: The command "npm run build" exited with code 1.
------
I am trying to build a dotnet project in my machine using nixpacks build but in step 9 I get this error and I am not sure how to fix it. My understanding is that it maybe because I have typescript globally installed in my local machine? Let me know if I need to give more error outputs. Thank you
KKapatiD4/17/2023
N/A If so, how do I remove the rust tool chain file? Pretty sure I have not installed any Rust files in my machine. Seems like I solved my errors. Here is the list I have done to solve them - Add .dockerignore for dotnet project
# directories
**/bin/
**/obj/
**/out/

# files
Dockerfile*
**/*.trx
**/*.md
**/*.ps1
**/*.cmd
**/*.sh
# directories
**/bin/
**/obj/
**/out/

# files
Dockerfile*
**/*.trx
**/*.md
**/*.ps1
**/*.cmd
**/*.sh
- Change js package verions in my package.json file
{
...
"devDependencies": {
...
- "typescript": "^5.0.0",
+ "typescript": "4.9.5",
- "vite": "^3.1.0"
+ "vite": "3.2.5"
}
}
{
...
"devDependencies": {
...
- "typescript": "^5.0.0",
+ "typescript": "4.9.5",
- "vite": "^3.1.0"
+ "vite": "3.2.5"
}
}
Quite surprised that I needed to do this when building in my local machine since when I deployed it to railway I did not get these errors.

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts