Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Could not resolve './ol/AssertionError' from build/index.js #2

Open
xedroid opened this issue Sep 27, 2018 · 6 comments
Open

Could not resolve './ol/AssertionError' from build/index.js #2

xedroid opened this issue Sep 27, 2018 · 6 comments

Comments

@xedroid
Copy link

xedroid commented Sep 27, 2018

Hi,
I tried to use this tool but I got this error.
I hope for help with it :)

image

Additional info:

  • I tried to build it with Ubuntu on Windows

Also I want build openlayers with custom changes so I want point to other location than node_modules. Where I can change path to ol sources?

@gberaudo
Copy link
Contributor

Hi @xedroid,

Check the ol symlink is present in the build directory (it should have been created by git):

gberaudo@wrk29:/tmp/legacylib/ol5 (master)$ ls -lh build/
total 11M
-rw-rw-r-- 1 gberaudo gberaudo  71K Sep 27 14:35 index.js
-rw-rw-r-- 1 gberaudo gberaudo 156K Sep 27 14:35 info.json
lrwxrwxrwx 1 gberaudo gberaudo   26 Sep 27 14:35 ol -> ../node_modules/ol/src/ol/
-rw-rw-r-- 1 gberaudo gberaudo 2.4M Sep 27 14:35 ol-debug.js
-rw-rw-r-- 1 gberaudo gberaudo 3.9M Sep 27 14:35 ol-debug.js.map
-rw-rw-r-- 1 gberaudo gberaudo 652K Sep 27 14:36 ol.js
-rw-rw-r-- 1 gberaudo gberaudo 3.3M Sep 27 14:36 ol.js.map

@xedroid
Copy link
Author

xedroid commented Sep 27, 2018

Ok I have that file. So If I want to change location of my openlayers sources I need just change path here?
Any idea how to fix error?

@gberaudo
Copy link
Contributor

What is the result of ls build/ol/AssertionError.js?

To build a different version of OpenLayers you need to change the package.json file.

@xedroid
Copy link
Author

xedroid commented Sep 27, 2018

There are not any new files in build directory so build isn't success.
ls: cannot access 'build/ol/AssertionError.js': Not a directory
It can't pass task ../node_modules/.bin/rollup --config rollup.js --environment BUILD:development

I don't want build different version of openlayers. I want tool to take sources from different location than node_modules

@xedroid
Copy link
Author

xedroid commented Sep 27, 2018

There is result in index.js file.
import $ol$AssertionError from './ol/AssertionError';
But there isn't "ol" folder in build folder.

@gberaudo
Copy link
Contributor

If the directory is not here you should create it using a symlink (or a copy).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants