node version :10.14.1
npm version:6.4.1
error found
Using environment variables from .env
Unexpected token < in JSON at position 0
The current default backend for Venia development is:
https://release-dev-rxvv2iq-zddsyhrdimyra.us-4.magentosite.cloud/
The configured MAGENTO_BACKEND_URL in the current environment is
http://localhost/magento223/
Consider updating your .env file or environment variables to resolve the reported issues.
@aliaathil
1) Does your PWA Studio install work with the pre configured backend url?
2) Two (wild) guesses based upon the info that you provided:
< token might indicate an unresolved git conflict like having <<<<<<< HEAD in a JSON somewhere or it might be a typing error having added a < erroneously.So in case above suggestions didn't help, could you provide more info on the exact issue:
Thank for reply
im using ubuntu 16.04 LTS
Magento version. 2.3.0
Error log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle @magento/[email protected]~prebuild: @magento/[email protected]
6 info lifecycle @magento/[email protected]~build: @magento/[email protected]
7 verbose lifecycle @magento/[email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle @magento/[email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/html/pwa-studio/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle @magento/[email protected]~build: CWD: /var/www/html/pwa-studio
10 silly lifecycle @magento/[email protected]~build: Args: [ '-c', 'npx lerna run --stream build -- -s' ]
11 silly lifecycle @magento/[email protected]~build: Returned: code: 1 signal: null
12 info lifecycle @magento/[email protected]~build: Failed to exec build script
13 verbose stack Error: @magento/[email protected] build: npx lerna run --stream build -- -s
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid @magento/[email protected]
15 verbose cwd /var/www/html/pwa-studio
16 verbose Linux 4.8.0-36-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v10.14.1
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error @magento/[email protected] build: npx lerna run --stream build -- -s
22 error Exit status 1
23 error Failed at the @magento/[email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
hey @aliaathil looking at issue https://github.com/magento-research/pwa-studio/issues/626 . Seems you solved this issue because you managed to go a step further in the build now by using a valid domain http://magento223.local instead of http://localhost/magento223/ ?
Can you please confirm so we can close this one?
@aliaathil Could you explain how to fix above issue?
i have changed the url to http://magento223.local solved the issue thanks @ennostuurman
thanks @aliaathil for the confirmation and closing the issue. cc: @khoimm92 , here ^^ you have your answer ;-)
Hi @ennostuurman hope you are doing good :)
can you please help me regarding this error that is when i run this command _sudo npm run build_
please follow the screenshots urls
Console:

Log file:

Note: i can bypass this error when i run build with -f flag but i want to fix this error.
@ennostuurman bro my problem is resolved, i have just set mode to developer and install some required packages (readdir-enhanced ,virtual-module-webpack-plugin and graphql-playground-middleware-express), and everything is working fine :)
hello @Muhammad-Bin-Tabassum glad you solved it, the best issues are the ones that are solved by .... yourself, often asking a question to someone else makes the issue suddenly more clear to yourself ;-) .
I see that the error messages are luckily verbose enough when you run against a Magento instance in production mode, i.e. "Cannot validate queries because the configured backend ... disallows introspection in "production mode" .
Just for my understanding:
1) curious why you missed the NPM packages as they're all defined in pwa-buildpack package.json , so running npm install from project root should suffice to install the NPM packages?
2) was there anything in the install documentation unclear to you?
Hi @ennostuurman actually documentation is clear but after cloning pwa-studio and run npm install everything was fine but during running build i got above dependency errors, as i have also checked in pwa-studio package.json file but didn't find these in it, I have new setup of linux but this shouldn't be a reason for these dependencies.
hi @Muhammad-Bin-Tabassum thanks for explaining, understood from your comments in PR 718 that this was a local issue.
Yes @ennostuurman it might be my local problem but still i'm eager to know why it has happened anyhow i will find some way.
@ennostuurman please help me to regarding this error. i attached screen shot. i have used this link to install https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/
thanks
sharath
@ennostuurman please help me to regarding this error. i attached screen shot. i have used this link to install https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/
thanks
sharath
can you attach compete log
Reomve node modules and run npm intsall and try again may solve issue
@sharathr3 did you manage to get PWA studio running as per recommendations from @aliaathil ?
So from PWA Studio project root:
1) npm run clean:all
2) npm install
3) npm run build