ember-cli / ember-cli/ember-cli-version-checker

`NPMDependencyVersionChecker` `_jsonPath` is null if `basedir` = `/`

Aperta
#275 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
24
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.