Ensono / stacks-webapp-template

Templating monorepo focusing on boilerplate web apps
https://amido.github.io/stacks/
MIT License
3 stars 9 forks source link

Getting Started #1236

Open saj-man opened 2 years ago

saj-man commented 2 years ago

Hello.

I am currently following your documentation here: https://stacks.amido.com/docs/workloads/azure/frontend/SSR/getting_started_ssr

I have ran:

npx @amidostacks/scaffolding-cli run -i

Changed the environment variables (I'm on Windows 10)

npm install

npm run build

When I run the build I get the following error:

PS C:\Temp\amido-stacks\demo\src\ssr> npm run build

demo@0.1.0 build C:\Temp\amido-stacks\demo\src\ssr tsc --project tsconfig.server.json && node_modules/.bin/next build

'node_modules' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! demo@0.1.0 build: tsc --project tsconfig.server.json && node_modules/.bin/next build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the demo@0.1.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I was expecting it just to build. What am I doing wrong?

For information, I'm using Node12 as per the prerequisites.

Thanks.

peet-j commented 2 years ago

Hi @saj-man Looks like a path issue due to DOS \ versus linux/mac / Can you try updating the build task on line 9 of package.json and trying again?:

"build": "node_modules/.bin/tsc --project tsconfig.server.json && node_modules/.bin/next build", to "build": "tsc --project tsconfig.server.json && next build",

ElvenSpellmaker commented 2 years ago

@saj-man Hey, the builds currently are assuming you're using bash through something like GitBash (or Cygwin etc), if you have that then it should work out of the box.

If you want to use it on the current terminal, you'd need to alter the build to something like @peet-j has mentioned above. 🙂