aurelia / aurelia/cli

jquery.inputmask gives file not found error during rebuild of bundle

Open
#591 12 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a bug report**

* **Library Version:**
0.28.0

**Please tell us about your environment:**
* **Operating System:**
OSX 10.x|Linux (distro)|Windows [7|8|8.1|10]

* **Node Version:**
any

* **NPM Version:**
any

**Current behavior:**
1. `npm install jquery.inputmask jquery`
2. use the following config in aurelia.json:
```

"jquery",
{
"name": "jquery.inputmask",
"main": "index.js",
"path": "../node_modules/jquery.inputmask",
"resources": []
}
```
3. in app.js use `import 'jquery.inputmask';`
4. observe that `au run --watch` works fine initially, and in the browser `window.Inputmask` is available
5. in app.js, comment out the import line, save, and remove the comment again
6. observe the following error:

```
File not found or not accessible: C:/Development/aurelia-cli-instantsearch/src/inputmask.js. Requested by C:\Development\aurelia-cli-instantsearch\src\app.js
{ Error: ENOENT: no such file or directory, open 'C:\Development\aurelia-cli-instantsearch\src\inputmask.js'
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:491:33)
at Object.exports.readFileSync (C:\Development\cli\lib\file-system.js:74:13)
at fileRead (C:\Development\cli\lib\build\bundled-source.js:101:27)
at Object.context.fileRead (C:\Development\cli\lib\build\amodro-trace\lib\loader\Loader.js:179:18)
at Object.context.load (C:\Development\cli\lib\build\amodro-trace\lib\loader\Loader.js:370:32)
at Module.load (eval at (C:\Development\cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), :832:29)
at Module.fetch (eval at (C:\Development\cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), :822:66)
at Module.check (eval at (C:\Development\cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), :854:30)
at Module.enable (eval at (C:\Development\cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), :1173:22)
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Development\\aurelia-cli-instantsearch\\src\\inputmask.js' }
```

**Expected/desired behavior:**

* **What is the expected behavior?**
it not to look for the inputmask.js (or related) file in that location

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.