Skip to content

Instantly share code, notes, and snippets.

@ilyavf
Last active December 6, 2016 18:53
Show Gist options
  • Save ilyavf/9f115d00201dee583a4dfb4b744bbfab to your computer and use it in GitHub Desktop.
Save ilyavf/9f115d00201dee583a4dfb4b744bbfab to your computer and use it in GitHub Desktop.
steal is trying to load package.json from a wrong location

Install project

$ git clone https://github.com/donejs/bitcentive && cd bitcentive
$ git checkout fail-loading
$ npm install
$ npm start

Note: the app is served from /public with its own /public/node_modules.

Open in browser

http://localhost:3030/test.html

Notice the error:

steal.js:6621
SyntaxError: Error loading "[email protected]#lib/socket" at http://localhost:3030/node_modules/socket.io-client/lib/socket.js
Error loading "[email protected]#lib/socket" from "[email protected]#test/test" at http://localhost:3030/test/test.js
Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    ...

The response for the missing file is the index page:

http://localhost:3030/node_modules/steal-socket.io/node_modules/component-emitter/package.json

<!DOCTYPE html>
<html>
  <head> ...
$ ls public/node_modules/steal-socket.io/node_modules
engine.io-client
socket.io-client
$ ls public/node_modules
...
component-emitter @1.2.1
...
socket.io-client @1.6.0
$ npm ls socket.io-client
[email protected] /Users/ilya/dev/bitcentive2/public
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
$ npm ls component-emitter
[email protected] /Users/ilya/dev/bitcentive2/public
└─┬ [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
{
"name": "bitcentive",
"version": "0.0.1",
"description": "Royalties",
"homepage": "bitcentive.herokuapp.com",
"main": "bitcentive/index.stache!done-autorender",
"system": {
"main": "bitcentive/index.stache!done-autorender",
"configDependencies": [
"node_modules/can-zone/register"
],
"npmAlgorithm": "flat",
"envs": {
"server-production": {
"renderingBaseURL": "https://bitcentive-e208d.firebaseapp.com/"
}
},
"plugins": [
"steal-css",
"steal-less",
"steal-stache"
]
},
"dependencies": {
"auth-component": "^3.2.1",
"bootstrap": "^3.3.7",
"can-component": "^3.0.2",
"can-connect": "^1.0.12",
"can-connect-feathers": "^2.0.0-pre.10",
"can-define": "^1.0.4",
"can-define-stream": "0.0.2",
"can-event": "^3.0.1",
"can-observation": "^3.0.2",
"can-route": "^3.0.4",
"can-route-pushstate": "^3.0.0",
"can-set": "^1.0.2",
"can-stache": "^3.0.9",
"can-stream": "0.0.5",
"can-util": "^3.0.12",
"can-view-autorender": "^3.0.1",
"can-view-model": "^3.1.0",
"can-zone": "^0.6.0",
"cookie-storage": "^1.0.4",
"done-autorender": "^0.9.0-pre.1",
"done-component": "^0.6.0-pre.2",
"done-css": "^2.1.0-pre.0",
"done-serve": "^0.3.0-pre.1",
"done-ssr-middleware": "^0.4.0-pre.0",
"feathers": "^2.0.2",
"feathers-authentication": "^0.8.0-beta-1",
"feathers-authentication-popups": "0.0.9",
"feathers-authentication-popups-github": "0.0.3",
"feathers-hooks": "^1.5.8",
"feathers-rest": "^1.5.0",
"feathers-socketio": "^1.4.1",
"jquery": "^2.1.4",
"jwt-decode": "^2.1.0",
"moment": "^2.17.0",
"steal": "^1.0.0-rc.11",
"steal-css": "^1.0.0-rc.0",
"steal-less": "^1.0.0-rc.2",
"steal-socket.io": "^4.0.4",
"steal-stache": "^3.0.0-pre.3",
"superagent": "^2.3.0"
},
"devDependencies": {
"can-fixture": "^1.0.7",
"can-fixture-socket": "^0.5.7",
"documentjs": "^0.4.4",
"donejs-cli": "^0.10.0-pre.4",
"donejs-deploy": "^0.4.2",
"firebase-tools": "^3.2.0",
"funcunit": "^3.1.0",
"generator-donejs": "^0.10.0-pre.4",
"socket.io-client": "^1.6.0",
"steal-qunit": "^1.0.0-rc.0",
"steal-tools": "^1.0.0-rc.9",
"testee": "^0.3.0-pre.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment