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

File not found (ENOENT) for CSS source map using Bootstrap #42

Open
admackin opened this issue Mar 25, 2015 · 1 comment
Open

File not found (ENOENT) for CSS source map using Bootstrap #42

admackin opened this issue Mar 25, 2015 · 1 comment

Comments

@admackin
Copy link

I can't get sourcemap bundling working with Bootstrap's CSS, and after some investigation, it seems like it might be an Atomify bug.

It works fine in prodution mode, but I get an error such as the following when running with --debug:

   { [Error: ENOENT, no such file or directory '../node_modules/bootstrap/dist/css/bootstrap.css.map']
  errno: 34,
  code: 'ENOENT',
  path: '../node_modules/bootstrap/dist/css/bootstrap.css.map',
  syscall: 'open' }

The .map file does in fact exist (although I don't know what the path is relative to)

Here's a minimal package.json which you can use to reproduce the problem by running npm run bundle-dev:

{
  "name": "atomify-bootstrap-test",
  "version": "0.1.0",
  "description": "Debug Atomify problem with Bootstrap CSS",
  "scripts": {
    "bundle-dev": "atomify --debug",
    "bundle": "atomify"
  },
  "dependencies": {
    "atomify": "^6.1.0",
    "bootstrap": "^3.3.4",
    "resrcify": "^1.1.3"
  },
  "atomify": {
    "css": {
      "entry": "client/main.css",
      "output": "public/bundle.css"
    },
    "assets": {
      "dest": "public/assets",
      "prefix": "../assets/"
    }
  }
}

The only other file you need is a CSS file at 'client/main.css' containing the line

@import "bootstrap";

I should point out that invoking rework-npm from the CLI doesn't generate such errors (and there is indeed a source map in the CSS, although I haven't checked if it's accurate)

./node_modules/rework-npm-cli/index.js client/main.css -m -o public/bundle.css

(Not sure if this should be an Atomify bug, but I'll leave that up to the maintainers to decide)

@Sarah4VT
Copy link

I am hitting this same issue. Did you ever find a resolution?

I put a few more updates here

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

2 participants