The brunch installed with the phoenix application does not work with databases

I created a Phoenix 1.0.4 application (Elixir). After I added some logic to the application, I wanted to switch my work to the outside. On the page http://www.jonathanbirkholz.com/how-to-use-font-awesome-on-phoenix/ I read that for the 3rd property I have to use Bower. Unfortunately, with font-awesome or bootstrap-sass from Bower and with the brunch build I always get:

 /.../my_app/node_modules/acorn/dist/acorn.js:1747 throw err; ^ SyntaxError: Unexpected token (2:10) at Parser.pp.raise (/.../my_app/node_modules/acorn/dist/acorn.js:1745:13) at Parser.pp.unexpected (/.../my_app/node_modules/acorn/dist/acorn.js:2264:8) at Parser.pp.semicolon (/.../my_app/node_modules/acorn/dist/acorn.js:2243:59) at Parser.pp.parseExpressionStatement (/.../my_app/node_modules/acorn/dist/acorn.js:2677:8) at Parser.pp.parseStatement (/.../my_app/node_modules/acorn/dist/acorn.js:2462:160) at Parser.pp.parseBlock (/.../my_app/node_modules/acorn/dist/acorn.js:2692:21) at Parser.pp.parseStatement (/.../my_app/node_modules/acorn/dist/acorn.js:2443:19) at Parser.pp.parseTopLevel (/.../my_app/node_modules/acorn/dist/acorn.js:2379:21) at Object.parse (/.../my_app/node_modules/acorn/dist/acorn.js:101:12) at parse (/.../my_app/node_modules/detective/index.js:9:18) at Function.exports.find (/.../my_app/node_modules/detective/index.js:44:15) at module.exports (/.../my_app/node_modules/detective/index.js:23:20) at /.../my_app/node_modules/deppack/index.js:83:12 at tryToString (fs.js:414:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12) 

I found that the problem was caused by the acorn-JavaScript library, so I am checking the dependency tree for Node modules:

 ├─┬ brunch@2.0.4 │ ├─┬ deppack@0.1.5 │ │ └─┬ detective@4.3.1 │ │ ├── acorn@1.2.2 

Brunch 2.0.4 (newest released) use dependencies for the old acorns library. There are newer versions of acorns, but the detective library allows you to use acorn 1.xx versions.z

+2
source share
2 answers

Perhaps I found that not so. Bower must be installed globally and must not exist locally (in node_modules).

+2
source

I had a similar problem.

Try using Node> 5 and NPM 3, clear the cache and set node_modules again (uninstall first).

0
source

Source: https://habr.com/ru/post/1239132/


All Articles