Babel fails if the js file destination is not on a child directory
See original GitHub issue- Laravel Mix Version: 0.12.1 (
npm list --depth=0
) - Node Version (
node -v
): 6.10.3 - NPM Version (
npm -v
): 5.0.1 - OS: OS X El Capitan 10.11.6
Description:
I have a project where the asset management is handled on a
Babel fails if the js file destination is not on a child directory, and triggers the Module build failed: Error: Couldn't find preset "env" relative to directory ...
error.
Steps To Reproduce:
File structure:
/assets
webpack.mix.js
webpack.mix.js
package.json
js/
app.js
sass/
app.sass
/application
/frontend
/js
/css
Mix code
mix.js('js/app.js', './../application/frontend/js/app.js'); // fails
// If the dest is a child directory, there is no problem
mix.js('js/app.js', 'foo/foo.js');
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Module import returns error if not in same directory as ... - GitHub
I move the "Spinner" component to the same level. and it works fine!! ... Any idea why? The import path in the first...
Read more >Not able to run simple babel from src folder to dist
This create new dist of dist like following but without the config.json file,why ? -dist -- bin ---www -- routes ---index1.js ---index2.js.
Read more >Config Files - Babel.js
New in Babel 7.x, Babel has a concept of a "root" directory, which defaults to ... config files are separated from the physical...
Read more >Error: Module not found on paths with a space in them - bud
Hi Bud version 6 has ModuleNotFound-Errors if a parent directory has a space in its name. It worked though in version 5.
Read more >Configuration - Quokka.js
Please note that any Babel paths that you specify in your global config file will use your project folder as the root folder...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JeffreyWay still getting this error here
Still having this issue on version
1.2.2
.I have the following:
and inside I do:
and as a result I get the following error:
(I have edited the path in the error to be relative instead of static).
EDIT: @ruchern
.scripts
doesnt work. It removes the error from the terminal and puts it in the web console.