Loopback-next: Auto generation while in vagrant provisioning

Created on 15 Mar 2020  路  9Comments  路  Source: strongloop/loopback-next

Steps to reproduce

Using Vagrant file for generic/rhel8, install npm and node, install @loopback/cli, then trying to create loopback project with cli.

Current Behavior

The vagrant keep telling me Generation is aborted: SyntaxError: Unexpected end of JSON input
and unable to prepare context: path "loopback-example" not found

Expected Behavior

Expected the lb4 project generated

Additional information

sudo npm install -g @loopback/cli -y
sudo lb4 app loopback-example -y

where the error pop out

bug stale

All 9 comments

Hi @DanielChuDC, thanks for the report!

Is there a reason why sudo is used? I'm not familiar with this specific environment but in most, it's generally not recommended to run Node.js or NPM with sudo privileges unless necessary,

Could you try without sudo?

@achrinza I tried with no sudo too. then to prevent there is permission issue, then I added sudo. The problem persist.

@DanielChuDC
I have heard mumbles about Vagrant and filesystems in the past... Could you try mkdir test-folder to confirm permissions?

@DanielChuDC ,

Actually, can you please more details:

  1. What OS you are on
  2. What Vagrant version you are using
  3. Is it a community vagrant file or custom made vagrant file

Thx

:)

@dougal83 @emonddr Thank you for your reply.
@dougal83 I tried mkdir test-folder and it works.

@emonddr The informatino below
MacOS Catalina 10.15.3
Vagrant version Installed Version: 2.2.6
I custom made vagrant file based on generic/rhel8.

I will upload the file soon

OK, not permission issue directly then, but unfortunately I avoid macOS like the plague so I cannot help further myself. 馃し鈥嶁檪

Hi @emonddr and @dougal83 ,

I made a branch in my project for testing this issue.

Feel free to clone this project, checkout branch loopback-cli-generate

Fulfill the prerequisite and vagrant up

The error message shown below.

Screenshot 2020-03-22 at 12 07 52 PM

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhdawson picture mhdawson  路  3Comments

aceraizel picture aceraizel  路  3Comments

half-blood-programmer picture half-blood-programmer  路  3Comments

teambitcodeGIT picture teambitcodeGIT  路  3Comments

marioestradarosa picture marioestradarosa  路  3Comments