Open flyingdove opened 2 years ago
did you do a npm run install
I also have the same issue. So, I download and use the file directly as shown below.
$ sudo apt install subversion
$ cd ~/some_package/node_modules/ion-sdk-js/lib/
$ svn export https://github.com/pion/ion-sdk-js.git/trunk/src/_library
Workaround to automate download missed files on npm install
(only Linux, without subversion install, only git binary need):
add scripts/fix_deps.sh in your project folder with content:
#!/bin/sh
set -e
cd $INIT_CWD
if [ -d ./node_modules/ion-sdk-js/lib ] && [ ! -d ./node_modules/ion-sdk-js/lib/_library ]; then
rm -rf ion-sdk-js
git clone https://github.com/pion/ion-sdk-js
mv ./ion-sdk-js/src/_library ./node_modules/ion-sdk-js/lib/
rm -rf ion-sdk-js
fi
make it executable, and then in your package.json add record in "scripts" section:
"scripts": {
......
"postinstall": "scripts/fix_deps.sh"
},
and thats all
error ./node_modules/ion-sdk-js/lib/signal/grpc-web-impl.js:7:0
Module not found: Can't resolve '../_library/proto/sfu/sfu_pb_service'
I have reviewed the source code and found that the _library
directory is just a name, but there are some steps codes in Makefile compilation:
proto: mkdir - p lib===cp rf./src/_library lib
clean: rm - rf src/_library
Deleting the _library
directory caused the ESModule not to find the corresponding module when referencing files
cc: @ionorg
On npm run serve got this:
These relative modules were not found