Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPMDependencyVersionChecker _jsonPath is null if basedir = / #275

Open
trevordevore opened this issue Jul 7, 2021 · 0 comments
Open

NPMDependencyVersionChecker _jsonPath is null if basedir = / #275

trevordevore opened this issue Jul 7, 2021 · 0 comments

Comments

@trevordevore
Copy link

trevordevore commented Jul 7, 2021

While working on a Docker file I encountered a problem where a version check performed by ember-cli-version-checker would fail when running in Docker. The error occurred because the Ember app source files were stored at the root of the drive.

In /src/npm-dependency-version-checker.js the following code is used for the _jsonPath property:

this._jsonPath = resolvePackage(this.name, basedir);

If basedir is / then this._jsonPath ends up being null. So this Docker file would lead to an error:

FROM node:14.16.0

# Copy the main application.
COPY . ./

...
ember build

This Docker file works correctly though:

FROM node:14.16.0

# Copy the main application.
COPY . ./my-ember-app
WORKDIR my-ember-app

...
ember build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant