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

npm-crawl fails to find a package when using github dependency shorthand #1504

Open
nlundquist opened this issue Aug 22, 2019 · 1 comment
Open

Comments

@nlundquist
Copy link

Reproducible: Always

When using an NPM compatible shorthand for a GitHub hosted dependency ie:

"dependencies": {
  ...
  "can-legacy-view-helpers": "canjs/can-legacy-view-helpers#can-5-compat",
}

rather than:

"dependencies": {
  ...
  "can-legacy-view-helpers": "git+https://git@github.com:canjs/can-legacy-view-helpers#can-5-compat"",
}

Though the application works fine in dev mode, a Steal build fails with the following:

build - buildResult TypeError: Cannot read property 'steal' of undefined
at Object.config (VM1439 npm-utils.js:564)
at Object.getDependencyMap (VM1441 npm-crawl.js:242)
at Object.loadPlugins (VM1441 npm-crawl.js:181)
at VM1441 npm-crawl.js:107

Environment:

Software Version
Steal version 2.2.2
Steal-tools version 2.2.2
node -v 10.16.0
npm -v 6.9.0
Operating system MacOS 10.14.5

Note: This same failure occurs when using a valid Git URL (rather than shorthand) of the form git+ssh://git@github.com:canjs/can-ejs#can-5-compat". Steal only appears to play nice with Git URLs that are prefixed with git+https://.

@m-mujica
Copy link
Contributor

m-mujica commented Oct 7, 2019

@nlundquist do you have a repo where I can replicate this issue?

I just tried with:

{
  "name": "steal-crawl-issue",
  "version": "1.0.0",
  "main": "main.js",
  "dependencies": {
    "can": "canjs/canjs#master"
  },
  "devDependencies": {
    "steal": "^2.2.2",
    "steal-tools": "^2.2.2"
  }
}

and

{
  "name": "steal-crawl-issue",
  "version": "1.0.0",
  "main": "main.js",
  "dependencies": {
    "can": "^5.0.0",
    "can-legacy-view-helpers": "canjs/can-legacy-view-helpers#can-5-compat"
  },
  "devDependencies": {
    "steal": "2.2.2",
    "steal-tools": "2.2.2"
  }
}

both apps build without errors (I'm importing the module using the shorthand in my code).

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

No branches or pull requests

3 participants